mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
feat(webpack, schema): add webpack experiments configuration (#21446)
This commit is contained in:
parent
5a25fca475
commit
857511f448
@ -290,5 +290,11 @@ export default defineUntypedSchema({
|
|||||||
* @type {Array<(warn: typeof import('webpack').WebpackError) => boolean>}
|
* @type {Array<(warn: typeof import('webpack').WebpackError) => boolean>}
|
||||||
*/
|
*/
|
||||||
warningIgnoreFilters: [],
|
warningIgnoreFilters: [],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure [webpack experiments](https://webpack.js.org/configuration/experiments/)
|
||||||
|
* @type {false | typeof import('webpack').Configuration['experiments']}
|
||||||
|
*/
|
||||||
|
experiments: {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -39,7 +39,9 @@ function baseConfig (ctx: WebpackConfigContext) {
|
|||||||
...options.webpack.optimization,
|
...options.webpack.optimization,
|
||||||
minimizer: []
|
minimizer: []
|
||||||
},
|
},
|
||||||
experiments: {},
|
experiments: {
|
||||||
|
...options.webpack.experiments
|
||||||
|
},
|
||||||
mode: ctx.isDev ? 'development' : 'production',
|
mode: ctx.isDev ? 'development' : 'production',
|
||||||
cache: getCache(ctx),
|
cache: getCache(ctx),
|
||||||
output: getOutput(ctx),
|
output: getOutput(ctx),
|
||||||
|
Loading…
Reference in New Issue
Block a user