babel-plugin-transform-postcss
babel-plugin-transform-postcss copied to clipboard
Module resolver
Hello!
I've been trying to use babel-plugin-transform-postcss
but I keep having ENOENT
due to the path used in the project. I didn't want to end up with ../../grid.css
so I added in my webpack configuration my src
folder in the resolve module array.
resolve: {
modules: [
'node_modules',
'src'
],
...
}
},
How can I do the same here?
Thanks!
@Danetag I'm open to a PR to try to support that, but I don't personally use wepback, so I'm not sure where that makes its way into babel or other module resolvers.
One way is to add a symlink to src
inside of node_modules
.
Generally, I've tried to avoid both of these types of practices in the past and instead use relative paths. I know there are strong opinions out there to use relative paths, but I'm open to trying to support this if you can track how this plugin would know where modules are located (i.e. if some env var is set).