vue-cli-plugin-multi-compiler
Advanced tools
Weekly downloads
Readme
Vue CLI 3 plugin to add support for webpack multi-compiler mode
vue add multi-compiler
This plugin provides a option (configureMultiCompilerWebpack
) in vue.config.js
to tweak original vue cli webpack config into multiple configs.
You can use either a function
or an array
:
module.exports = {
pluginOptions: {
configureMultiCompilerWebpack: webpackConfig => {
// `webpackConfig` here is the one resolved by vue cli.
// (**after** executing `configureWebpack` and `chainWebpack`)
const cloneDeep = require('lodash.clonedeep')
const mainConfig = cloneDeep(webpackConfig)
const appConfig = cloneDeep(webpackConfig)
mainConfig.entry = {
main: './src/main.js'
}
appConfig.entry = {
app: './src/app.js'
}
// return an array to invoke webpack multi-compiler mode
return [mainConfig, appConfig]
}
}
}
module.exports = {
pluginOptions: {
configureMultiCompilerWebpack: [
// configurations here will be merged with original webpack config
// by `webpack-merge`
{
entry: {
main: './src/main.js'
}
},
{
entry: {
app: './src/app.js'
}
}
]
}
}
FAQs
use vue-cli with webpack multi-compiler mode
The npm package vue-cli-plugin-multi-compiler receives a total of 622 weekly downloads. As such, vue-cli-plugin-multi-compiler popularity was classified as not popular.
We found that vue-cli-plugin-multi-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.