I\'m trying to inject a variable into each module within my webpack bundle in order to have debugging information for JS errors per file. I\'ve enabled
node: {
I use variables to resolve a couple of variables in my webpack.config.js
file:
plugins: [
new webpack.DefinePlugin({
ENVIRONMENT: JSON.stringify(process.env.NODE_ENV || 'development'),
VERSION: JSON.stringify(require('./package.json').version)
})
]
It might not be dynamic enough, but if it is, then you might be able to bypass that loader solution.