Registry / web-framework / vue-cli-plugin-multi-compiler

vue-cli-plugin-multi-compiler

JSON →
library0.1.0jsnpmunverified

Vue CLI 3 plugin enabling webpack multi-compiler mode, allowing parallel builds of multiple configs from a single vue-cli project. Current version 0.1.0 targets Node >=8 and Vue CLI 3 ecosystems. Key differentiator: supports both function and array configuration modes for splitting webpack configs, with automatic merging via webpack-merge when using array mode. Low release cadence with no updates since initial release. Use for projects needing multiple entry points or separate build targets from the same Vue CLI setup, such as main + app bundles.

npm install vue-cli-plugin-multi-compiler
INSTALL
IMPORT
SIG · VUE-CLI-PLUGIN-MUL
V
vue-cli-plugin-multi-compiler
web-frameworkjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Shows how to add the plugin and configure multiple webpack configs using function mode in vue.config.js.

// Install via Vue CLI vue add multi-compiler // In vue.config.js module.exports = { pluginOptions: { configureMultiCompilerWebpack: webpackConfig => { 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 [mainConfig, appConfig]; } } }; // Run build vue-cli-service build
Debug
Known issues
gotchaThe plugin only works with Vue CLI 3. It is incompatible with Vue CLI 4+ (no webpack version checks).
fix
Use Vue CLI 3 or migrate to @vue/cli-service with custom webpack chain.
affects: >=0.1.0
deprecatedVue CLI 3 is deprecated. Consider upgrading to Vue CLI 4+ or Vite.
fix
Migrate project to Vue CLI 4 or use Vite with custom builds.
affects: >=0.1.0
gotchaThe function mode expects lodash.clonedeep for deep cloning; not providing it will cause reference issues.
fix
Install lodash.clonedeep and require it inside the function.
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'webpack-merge'
Missing runtime dependency webpack-merge (used internally by array mode).
fix
Run 'npm install webpack-merge --save-dev' or 'yarn add webpack-merge --dev'.
Property 'configureMultiCompilerWebpack' does not match any schema
Misplaced configuration under vue.config.js root instead of pluginOptions.
fix
Wrap config in pluginOptions: { configureMultiCompilerWebpack: ... }
TypeError: webpackConfig.entry is not iterable
Function mode returned a non-array or malformed config array.
fix
Ensure the function returns an array of valid webpack configuration objects.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
vue-cli-plugin-multi-compilerrequiredThe plugin itself must be installed via vue add
lodash.clonedeepoptionalUsed for deep cloning webpack config in function mode
webpack-mergerequiredUsed internally for array mode merging
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
vue-cli-plugin-multi-compiler — npm install vue-cli-plugin-multi-compiler · libregistry