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:
parent
ec9fc46477
commit
3f50abcb51
|
@ -12,7 +12,7 @@ module.exports = function (content, sourceMap) {
|
|||
|
||||
const emit = (code, map) => {
|
||||
this.emitFile(interpolatedName, code, map)
|
||||
this.callback(null, code, map)
|
||||
this.callback(null, content, sourceMap)
|
||||
}
|
||||
|
||||
if (query.transform) {
|
||||
|
|
Loading…
Reference in a new issue