[webpack2] loader modules resolved only from root
See original GitHub issueIf I have config:
module: {
loaders: [
{test: /\.css$/, loader: 'style!css'}
]
},
resolve: {
modules: ['node_modules', __dirname + '/client/node_modules'],
moduleExtensions: ["-loader"],
}
if install style-loader
into /client/node_modules
It will not find it, and have to install it to /node_modules
. Though resolution from /client/node_modules
works inside app’s code.
Issue Analytics
- State:
- Created 7 years ago
- Comments:28 (7 by maintainers)
Top Results From Across the Web
Resolve
Resolve. These options change how modules are resolved. Webpack provides reasonable defaults, but it is possible to change the resolving in detail.
Read more >Having problems with resolve.root - webpack
Webpack says it can't resolve it. Thanks. EDIT: The problem was that I was using 2.0.0-beta. I downgraded to 1.12.12 and it works....
Read more >sass-loader
The sass-loader uses Sass's custom importer feature to pass all queries to the Webpack resolving engine. Thus you can import your Sass modules...
Read more >How to transpile ES modules with webpack and Node.js
This means that loaders can also run in the Node.js environment and, therefore, also follow the module resolution standard. Loader naming ...
Read more >Module not found: Can't resolve 'babel-loader'
To solve the error Module not found: Error: Can't resolve 'babel-loader', ... --save-dev babel-loader @babel/core @babel/preset-env webpack # 👇️ ONLY If ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sokra thanks for copying me in. I’m not completely sure I follow the details, but perhaps you can ensure that the
System
global is overridden before using the loader-runner? SystemJS originally didn’t overrideSystem
if it didn’t already exist, but we had to add override behaviour because Traceur was overriding the globalSystem
. Unfortunately we’ve passed this virus on 😃@bebraw It’s still relevant, I came across this issue with
webpack 2.2.0-rc.7
. I usesystemjs
andsystemjs-builder
modules together withwebpack
in scope of onenode.exe
process. Here’s the output of failed webpack bundles:I’ve tried to get rid of
systemjs
dependencies andwebpack
worked properly for me. As a temporary solution I’ve removed global variableSystem
:SystemJS Builder doesn’t use that global variable, so it looks like it doesn’t affect it, anyway I’ve not caught any issues.
@whitecolor Does it make sense to reopen it?