diff --git a/lib/loader.js b/lib/loader.js index bb78486d6..2a8703b0b 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -216,9 +216,7 @@ module.exports = function (content) { // check and warn named exports if (!this.minimize) { output += - 'if (__vue_script__ &&\n' + - ' __vue_script__.__esModule &&\n' + - ' Object.keys(__vue_script__).length > 1) {\n' + + 'if (Object.keys(__vue_script__).some(function (key) { return key !== "default" && key !== "__esModule" })) {\n' + ' console.warn(' + JSON.stringify( '[vue-loader] ' + path.relative(process.cwd(), filePath) + ': named exports in *.vue files are ignored.'