Created
November 24, 2017 18:39
-
-
Save jeremiegirault/5c20cf51d79c737a09b8d370803622d1 to your computer and use it in GitHub Desktop.
Webpack hoisting issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import m1 from './module1' | |
import m2 from './module2' | |
console.log('module1:', m1.id, ' - module2:', m2.id) | |
export default { id: module.id } | |
export default { id: module.id } | |
const webpack = require('webpack') | |
module.exports = { | |
entry: './main.js', | |
output: { | |
filename: 'main.out.js' | |
}, | |
plugins: [ | |
new webpack.optimize.ModuleConcatenationPlugin() | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import m1 from './module1' | |
import m2 from './module2' | |
console.log('module1:', m1.id, ' - module2:', m2.id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { id: module.id } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { id: module.id } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack') | |
module.exports = { | |
entry: './main.js', | |
output: { | |
filename: 'main.out.js' | |
}, | |
plugins: [ | |
new webpack.optimize.ModuleConcatenationPlugin() | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment