I have chainWebpack section in vue.config.js. I
chainWebpack: config => {
// Add "node_modules" alias
config.resolve.alias
.set('node_modules', path.join(__dirname, './node_modules'));
config.devtool('source-map');
// Do not remove whitespaces
config.module.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compilerOptions.preserveWhitespace = true
return options
})
}
I want to include infrastructureLogging section to redirect logging to stdout instead of stderr:
module.exports = {
//...
infrastructureLogging: {
stream: process.stdout,
},
};
How can i do that in using chainWebpack section?
webpack-chain(used bychainWebpack) seems to not support an API forinfrastructureLogging.However, you could use
configureWebpackto pass that option to Webpack:Note
chainWebpackandconfigureWebpackcan be used together. Use thevue inspectcommand to see the resulting Webpack config.