fix: avoid injecting polyfills when targeting node

This commit is contained in:
Evan You
2018-06-05 13:20:53 -04:00
parent 1dc47eb955
commit 586c8aabfc

View File

@@ -58,7 +58,7 @@ module.exports = (context, options = {}) => {
// be force-included.
let polyfills
const buildTarget = process.env.VUE_CLI_TARGET || 'app'
if (buildTarget === 'app' && useBuiltIns === 'usage') {
if (buildTarget === 'app' && useBuiltIns === 'usage' && !process.env.VUE_CLI_BABEL_TARGET_NODE) {
polyfills = getPolyfills(targets, userPolyfills || defaultPolyfills, {
ignoreBrowserslistConfig,
configPath