Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loader respect the main field in package.json #2986

Closed
bobzhang opened this issue Aug 6, 2018 · 8 comments
Closed

loader respect the main field in package.json #2986

bobzhang opened this issue Aug 6, 2018 · 8 comments

Comments

@bobzhang
Copy link
Member

bobzhang commented Aug 6, 2018

relevant to #2950
@ccapndave would you mind contribute a minimal example and its expected behavior? thanks

@bobzhang
Copy link
Member Author

bobzhang commented Aug 6, 2018

relevant discussions microsoft/TypeScript#21423.
A typical main field:

"main" : "dist/src.js"

or

"main" : "dist/src"

@ccapndave
Copy link

Sure! https://github.com/ccapndave/bucklescript-issue-2986 is a minimal example to reproduce (details in the README).

@bobzhang
Copy link
Member Author

fixed in #2997 , not there is a bug in bs-css package.json giraud/bs-css#72

@ccapndave
Copy link

I'm not certain that this has fixed it - I replaced loader.js with the version in this pull request, but now the page tries to load http://localhost:8080/node_modules/bs-css/src/Css.js/src/glamor.re.js

@bobzhang
Copy link
Member Author

@ccapndave it works on your provided repo, can you check if it works on your provided repo but not on your production code?

@bobzhang bobzhang reopened this Aug 11, 2018
@bobzhang
Copy link
Member Author

bobzhang commented Aug 13, 2018

@ccapndave I think it is already fixed, can you confirm? btw, the bs-css main field is wrong. If not fixed, please provide a minimal example, thanks

@cristianoc
Copy link
Collaborator

This breaks https://github.com/cristianoc/genFlow/tree/master/sample-project.
I was going to sync up loader.js to this version, but won't.

@ccapndave
Copy link

I can confirm that the latest version of loader.js works in both my test and my real project (without any changes to the bs-css main field). Thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants