File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ var defaultLang = {
3030 script : 'js'
3131}
3232
33+ var checkNamedExports =
34+ 'if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {' +
35+ 'console.error("named exports are not supported in *.vue files.")}\n'
36+
3337module . exports = function ( content ) {
3438 this . cacheable ( )
3539 var isServer = this . options . target === 'node'
@@ -164,7 +168,7 @@ module.exports = function (content) {
164168 '__vue_options__ = __vue_exports__ = __vue_exports__ || {}\n' +
165169 // ES6 modules interop
166170 'if (typeof __vue_exports__.default === "object") {\n' +
167- ( isProduction ? '' : 'if (Object.keys(__vue_exports__).length > 1) console.error("[vue-loader]: named exports are not supported.")\n' ) +
171+ ( isProduction ? '' : checkNamedExports ) +
168172 '__vue_options__ = __vue_exports__ = __vue_exports__.default\n' +
169173 '}\n' +
170174 // constructor export interop
You can’t perform that action at this time.
0 commit comments