mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +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 {
|
||||
buildTarget,
|
||||
loose = false,
|
||||
useBuiltIns = 'usage',
|
||||
useBuiltIns = (modern ? false : 'usage'),
|
||||
modules = false,
|
||||
polyfills: userPolyfills,
|
||||
ignoreBrowserslistConfig = modern,
|
||||
|
@ -9,7 +9,18 @@ export default {
|
||||
usage: 'start <dir>',
|
||||
options: {
|
||||
...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) {
|
||||
const argv = cmd.getArgv()
|
||||
|
Loading…
Reference in New Issue
Block a user