This adds the __filename "dynamic constant" which is run during compile time. Webpack's DefinePlugin will replace any __filename strings with the absolute path of the current module.
// in `./web/pages/HomePage/Homepage.js`
console.log(__filename)
// will output `/home/dev/hammer/example-todos/web/pages/HomePage/Homepage.js`
We may want to consider using the relative value instead, or only making this available during development.
This adds the
__filename
"dynamic constant" which is run during compile time. Webpack's DefinePlugin will replace any__filename
strings with the absolute path of the current module.We may want to consider using the relative value instead, or only making this available during development.