Skip to content

Commit

Permalink
always use require for compoentNormalizer since it cannot be concaten…
Browse files Browse the repository at this point in the history
…ated
  • Loading branch information
yyx990803 committed Jun 29, 2017
1 parent 7f2fe87 commit ead854d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,15 +438,9 @@ module.exports = function (content) {
// scopeId,
// moduleIdentifier (server only)
// )
if (options.esModule) {
output += 'import normalizeComponent from ' +
loaderUtils.stringifyRequest(loaderContext, '!' + componentNormalizerPath) +
'\n'
} else {
output += 'var normalizeComponent = require(' +
loaderUtils.stringifyRequest(loaderContext, '!' + componentNormalizerPath) +
')\n'
}
output += 'var normalizeComponent = require(' +
loaderUtils.stringifyRequest(loaderContext, '!' + componentNormalizerPath) +
')\n'

// <script>
output += '/* script */\n'
Expand Down

0 comments on commit ead854d

Please sign in to comment.