Closed drpicox closed 6 years ago
Thanks for reporting! Related: https://github.com/substack/node-browserify/issues/1379#issuecomment-245024872
Hi.
When using rollupify in my task runner, it seems like importing from node_modules doesn't work. It just looks in the project root. I don't know if it is related to this issue, but it seems close.
I have:
import {Module} from 'whatever_module';
in one of my .js files, and get the followig error when using the rollupify transform plugin:
[Error: Could not load whatever_module (imported by D:\Projects\root\scripts\component.js): ENOENT: no such file or directory, open 'D:\Projects\root\whatever_module' while parsing file: D:\Projects\root\scripts\main.js]
Am I doing something obvious wrong, or could it be related to this issue? If I remove rollupify, everything works fine.
I think that it is not related.
By default rollup does not follow node/browserify conventions. You have to use a rollup plugin like:
@drpicox thanks, that fixed it :)
Rollupify does not works exactly as one expect that it should do.
But it happens that because it concatenates all files into the current one, when browserify process
requires
it looses the path.For example:
Does not work:
but with this change, it works:
Which is not the expected, neither the convenient.