Description
Hey guys, I wanted to ask about the reasoning behind using a path for NS variable, instead of something static, like a string.
Heres the issue, lets say i have a build toolchain. The toolchain contains an import to mini-css, then elsewhere in the project core i also import mini-css.
What happens is i get an error saying this[NS] cant be resolved. When logging i discover that each instance has a new name which is used for loader context.
So the loader is looking for this[‘plugin-sass/node_modules/extract’]
, but the plugin is providing this[‘react-static/node_modules/extract']
I can change this by hard coding a string, and everything works perfectly across the instances.
const NS = '_extractCssChunks'; // works perfectly
Id like to know if there is any particular reason it was coded in this manner?
if i were to change the NS
to something static in my project, would there any ramifications?
mini-css-extract-plugin/src/index.js
Line 13 in 6323e17
Appreciate your work and time.