Upon reading webpack config docs, something came across that I cannot fully understand.
As I know, we can define global constant with the DefinePlugin like below, at the compilation(build) time.
new webpack.DefinePlugin({
PRODUCTION: JSON.stringify(true),
VERSION: JSON.stringify('5fa3b9'),
BROWSER_SUPPORTS_HTML5: true,
TWO: '1+1'
});
As we can see usage above, there no needs to be any quotes for the keys.
But we have to use quotes for enabling or disabling feature flags like below.
new webpack.DefinePlugin({
'NICE_FEATURE': JSON.stringify(true),
'EXPERIMENTAL_FEATURE': JSON.stringify(false)
});
I might guess if that feature flags are similar to reserved keywords.
But I cannot find the list of feature flags provided by webpack in default.
So what exactly is that feature flags? Why do we need to use those quotes around the keys when enabling/disabling feature flags?
Thanks in advance.