1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Emit ES6 code for module source in emit file load (#2478)

Previously the commonjs modules were being passed into webpack dependency layer, preventing tree shaking.
This commit is contained in:
Kevin Decker 2017-07-06 23:18:00 -05:00 committed by Arunoda Susiripala
parent ec9fc46477
commit 3f50abcb51

View file

@ -12,7 +12,7 @@ module.exports = function (content, sourceMap) {
const emit = (code, map) => { const emit = (code, map) => {
this.emitFile(interpolatedName, code, map) this.emitFile(interpolatedName, code, map)
this.callback(null, code, map) this.callback(null, content, sourceMap)
} }
if (query.transform) { if (query.transform) {