-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Bundle fails for form require('../#/folder') due to hashbang-only directory #528
Comments
I might be wrong but it seems that this issue is prior to v14.0.0 We have the exact same issue in our repo, I confirm that things such as: var contains = require("es5-ext/string/#/contains"); like here (https://github.com/medikoo/d/blob/master/index.js#L7) are, I assume, wrongly converted to this path: Maybe we should be able to provide an option to allow this kind of char in the require path to be considered as part of the actual path ? |
@UnbearableBear I found this during a stress test, so it's interesting that this actually impacted real-life code; I will try to work on a fix soon. Smarter people than me like @Andarist or @lukastaegert might have some advice on where to start regarding this issue. |
Thanks a lot ! I'll try to cast an eye over it too but I'm going on holidays tomorrow so that's going to be shhhort |
Well, I'm not aware of any special use cases for |
I have the same problem when I use css related plugins, rollup-plugin-css-porter |
Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it. ⓘ |
Wasn't this addressed in a recent release? |
For anyone having this problem, update your |
commonjs
https://repl.it/@christiantjl/rollup-hashbang-dir (use
yarn test
for repro)Expected Behavior
Bundle produced at
output/bundle.mjs
.Actual Behavior
Error is thrown, presumably due to hashbang-only directory in filepath and/or
index.js
assumption (see below).Additional Information
I'm working to stress test Rollup against the entire dependency tree of the top 100 or so npm packages, which involves loading a set of plugins for legacy compatibility:
commonjs
,node-resolve
, andjson
. That work will be ongoing in a separate repo, but I wanted to submit this bug report in advance since it was the most common error at compile-time (the stress test will also run the bundle throughnode
runtime).import
statements for vast majority of these 1300 or so packages will indeed bundle, but a few (~17) do not, ~75% of which are modules that rely on a popular package calledes5-ext
. Some packages which cannot bundle because of this error include:d gulp es6-iterator es6-symbol es6-weak-map gulp gulp-cli last-run semver-greatest-satisfied-range sver-compat undertaker
Consider the example module on repl.it, that just imports this package to demonstrate:
Bundling with the plugins I mentioned throws:
Notice how it attempts to resolve to
array/index.js#/compact
and notarray/#/compact/index.js
for what I assume is https://github.com/medikoo/es5-ext/blob/master/json/safe-stringify.js#L3 :Please let me know if I have been unclear or can otherwise provide more information. The error message indicates Rollup Core, but I believe it's the CommonJS plugin that is directing Core to load a nonexistent file so I opened the issue in this repo.
The text was updated successfully, but these errors were encountered: