mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-12 18:08:35 -06:00
BREAKING CHANGE: PluginAPI.setMode() has been removed. Instead, for a plugin to
sepcify the default mode for a registered command, the plugins should expose
`module.exports.defaultModes` in the form of `{ [commandName]: mode }`.
close #959
13 lines
344 B
JavaScript
13 lines
344 B
JavaScript
// this file is for cases where we need to access the
|
|
// webpack config as a file when using CLI commands.
|
|
|
|
let service = process.VUE_CLI_SERVICE
|
|
|
|
if (!service) {
|
|
const Service = require('./lib/Service')
|
|
service = new Service(process.env.VUE_CLI_CONTEXT || process.cwd())
|
|
service.init()
|
|
}
|
|
|
|
module.exports = service.resolveWebpackConfig()
|