Craig
Craig

Reputation: 764

How can I stop vue cli3 build from including vue.js.min in my chunk-vendors.js file?

I'm starting from scratch and using the default create project from vue using cli 3. Everything is fine, however I noticed the chunk-vendors.js file contains vue.js.min. I don't want to include that file, how do I tell the vue to not include it in production builds?

Upvotes: 2

Views: 1558

Answers (1)

Brian Lee
Brian Lee

Reputation: 18197

If you want to exclude Vue from being bundled, use the library build target.

In lib mode, Vue is externalized. This means the bundle will not bundle Vue even if your code imports Vue. If the lib is used via a bundler, it will attempt to load Vue as a dependency through the bundler; otherwise, it falls back to a global Vue variable.

Upvotes: 4

Related Questions