component-webpack-plugin icon indicating copy to clipboard operation
component-webpack-plugin copied to clipboard

get module name from component.json

Open sokra opened this issue 11 years ago • 5 comments

see webpack/webpack#337

Instead of infering the module name from the path name, it should be read from the component.json.

  1. Read all component.jsons for all dependencies.
  2. Use the component which component.jsons name field matches the request.

This is a bigger refactoring...

sokra avatar Jul 01 '14 22:07 sokra

Thank you @sokra Now that I know how to temporarily fix it it isn't so urgent, but nice to have in the future. Im certain you have more urgent tasks at hands.

lmartins avatar Jul 02 '14 08:07 lmartins

@lmartins, I was wondering what fix you used. I am having difficulty loading components with webpack. I think the plugin assumes the component.json file is a direct child of the component folder. While components folder structure seems to be more like:

component-name
   |_ v.x.y.z
        |_ component.json
        |_ index.js

Even though I pass an array of paths for the lookupPaths, the plugin can't resolve the module.

Thanks!

st32lthx avatar Sep 18 '15 15:09 st32lthx

@aminmeyghani although I will possibly use again in the future, I am now using a different solution and to be honest can't quite recall what I did then.

lmartins avatar Sep 19 '15 17:09 lmartins

Thanks @lmartins ! Just wondering, do you use another plugin to work with component and webpack ?

st32lthx avatar Sep 20 '15 00:09 st32lthx

No, for the time being im using JSPM to build my JS projects.

lmartins avatar Sep 21 '15 08:09 lmartins