in vue-cli 3.0 how to generate complete webpack.config.js

In vue-cli-3.0, how to generate complete webpack.config.js. i have tried as the tutor but i failed with an error my trial code is just as below.

import a from "@vue/cli-service/webpack.config.js"

and the error is as below,i don't know why it does not work.

"Invalid left-hand side in assignment at Object../node_modules/@vue/cli-service/lib/Service.js"

is this a bug?

1 answer

  • answered 2018-10-11 21:57 Bob Fanger

    You can't, the webpack configuration is composed dynamically by the vue cli and plugins.

    If you need to tweak the config you can do so in the vue.config.js as described here

    You can also use the vue inspect to see the resolved configuration.

    Note the output is not a valid webpack config file, it's a serialized format only meant for inspection.