webpack / webpack

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

Home Page:https://webpack.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using loader for file in a dependency requires the dependency to have that loader installed

dbkr opened this issue · comments

library a is a plain javascript library.
Application has a file b.js that does require('a'), application uses webpack
If webpack needs a loader to load any file in module a, the loader needs to be installed in library a's node_modfules folder. webpack will fail with error, "Cannot resolve module" if the loader is installed only in the application's node_modules folder.

Webpack should be able to load the loader from the application's node_modules folder such that libraries which don't use webpack don't have to depend on webpack loaders in order for applications that use them to use webpack.

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

I'd still be interested in seeing this fixed.

Should work with webpack@latest. Feel free to report new issue with reproducible repo.