Vue-cli: yarn serve failed after adding resolve option in vue.config.js vue cli 3

Created on 28 Mar 2019  路  2Comments  路  Source: vuejs/vue-cli

i'm triying to create an alias in vue.config.js :
var path = require('path');

module.exports = {

resolve : {

    alias : {
        'core' : path.resolve(__dirname, '../core')
    }
}

}

then i run : yarn serve

and this is the result :

ERROR Invalid options in vue.config.js: "resolve" is not allowed

please help !

Most helpful comment

You need to wrap that into the configureWebpack field.
https://cli.vuejs.org/guide/webpack.html#simple-configuration

All 2 comments

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

You need to wrap that into the configureWebpack field.
https://cli.vuejs.org/guide/webpack.html#simple-configuration

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OmgImAlexis picture OmgImAlexis  路  3Comments

brandon93s picture brandon93s  路  3Comments

Gonzalo2683 picture Gonzalo2683  路  3Comments

CodeApePro picture CodeApePro  路  3Comments

jgribonvald picture jgribonvald  路  3Comments