mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-18 14:41:25 +00:00
feat: add --modern to nuxt start (#4254)
This commit is contained in:
parent
19287cce96
commit
12151d81d6
@ -39,7 +39,7 @@ module.exports = (context, options = {}) => {
|
|||||||
const {
|
const {
|
||||||
buildTarget,
|
buildTarget,
|
||||||
loose = false,
|
loose = false,
|
||||||
useBuiltIns = 'usage',
|
useBuiltIns = (modern ? false : 'usage'),
|
||||||
modules = false,
|
modules = false,
|
||||||
polyfills: userPolyfills,
|
polyfills: userPolyfills,
|
||||||
ignoreBrowserslistConfig = modern,
|
ignoreBrowserslistConfig = modern,
|
||||||
|
@ -9,7 +9,18 @@ export default {
|
|||||||
usage: 'start <dir>',
|
usage: 'start <dir>',
|
||||||
options: {
|
options: {
|
||||||
...common,
|
...common,
|
||||||
...server
|
...server,
|
||||||
|
modern: {
|
||||||
|
alias: 'm',
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'Build app for modern browsers',
|
||||||
|
prepare(cmd, options, argv) {
|
||||||
|
options.build = options.build || {}
|
||||||
|
if (argv.modern) {
|
||||||
|
options.build.modern = !!argv.modern
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async run(cmd) {
|
async run(cmd) {
|
||||||
const argv = cmd.getArgv()
|
const argv = cmd.getArgv()
|
||||||
|
Loading…
Reference in New Issue
Block a user