3

I would like to configure my Vue CLI to use external library and source-maps in order to debug my application.

I found those two vue.config.js samples for external libs.

module.exports = {
  chainWebpack: config => {
    config.externals({ jquery: 'jQuery', bootstrap: 'bootstrap' });
  }
};

and and for devtools.

module.exports = {
  configureWebpack: {
    devtool: 'source-map'
  }
}

How can I join those both configurations?

1 Answer 1

2

Have you tried the approach below?

module.exports = {
    chainWebpack: config => {
        config.externals({ jquery: 'jQuery', bootstrap: 'bootstrap' });
        config.merge({ devtool: 'source-map' });
    }
}
Sign up to request clarification or add additional context in comments.

1 Comment

I was looking for asset size limit warning for my Vue app, and config.merge did the trick for me, thanks @john craft

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.