Webpack.DefinePlugin and jshint are "undefined"
I am using webpack.DefinePlugin
to inject global constants as part of my build pipeline. However, jshint complains that the constant is "undefined".
From my webpack.config.js:
plugins: [
new webpack.DefinePlugin({
__ALEX__: JSON.stringify('alex.com')
}),
leads to:
WARNING in ./src/Main.js
jshint results in errors
'__ALEX__' is not defined. @ line 12 char 30
lock: new Thing(__ALEX__)
What is the correct way for jshint to step through the code after entering the constants?
+3
source to share