webpack: Global package: problem to resolve loaders
Hello,
I’m building a global npm package, but I get this error when using babel-loader:
Error: Cannot find module './node_modules/babel-loader/index.js'
The problem is webpack tries to resolve loaders from the target folder instead of my global package installation folder and of course I don’t want webpack to be installed in the target folder because it is unnecessary. How to tell webpack to use the babel-loader module from my global install ?
Thanks in advance for your help.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 18 (9 by maintainers)
resolveLoader
instead ofresolve
is the trick for resolving loaders