Is there a way to exclude vue.config.js from production output? #6494
Unanswered
gtbuchanan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
vue-cli-service build
seems to includevue.config.js
in the actual production output (Vue CLI v4.5.12). I assume it's included in Webpack for HMR in case it is changed during development. However, I wouldn't think there is a reason to include it in a production build considering there could be a bunch of code that would never be executed in a browser (e.g.chainWebpack
). This has the undesirable effect of having anyrequire
s invue.config.js
included in my production output. For example, I'm usingare-you-es5
to buildtranspileDependencies
and it ends up in my app. The only workaround I could think of was to usebrowser-or-node
and only loadare-you-es5
when Node is detected:Is there a way to prevent this?
Beta Was this translation helpful? Give feedback.
All reactions