File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
packages/@vue/cli-service/lib Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11const path = require ( 'path' )
2+ const chalk = require ( 'chalk' )
23const { matchesPluginId } = require ( '@vue/cli-shared-utils' )
34
45class PluginAPI {
@@ -114,7 +115,18 @@ class PluginAPI {
114115 * @return {object } Raw webpack config.
115116 */
116117 resolveWebpackConfig ( chainableConfig ) {
117- return this . service . resolveWebpackConfig ( chainableConfig )
118+ const config = this . service . resolveWebpackConfig ( chainableConfig )
119+ // performa a few warning checks
120+ const options = this . service . projectOptions
121+ if ( config . output . path !== this . resolve ( options . outputDir ) ) {
122+ console . error ( chalk . red (
123+ `\n\nConfiguration Error: ` +
124+ `Avoid modifying webpack output.path directly. ` +
125+ `Use the "outputDir" option instead.\n`
126+ ) )
127+ process . exit ( 1 )
128+ }
129+ return config
118130 }
119131
120132 /**
You can’t perform that action at this time.
0 commit comments