-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Importing a module into a module hanging rollup #52
Comments
Needed to use a relative path (even though the module is in the same directory as the other module)
|
Hmmm... interesting that the MDN page has module names ending with I discovered the hard way that you can't take shortcuts here - if you use You can override the resolution logic if necessary: rollup.rollup({
resolveId: function ( importee, importer ) {
// simplified example - assumes no external modules
if ( importee[0] !== '.' ) {
return path.resolve( baseDir, importee ) + '.js';
}
return path.resolve( path.dirname( importer, importee ) ) + '.js';
},
// other options
}).then(...) |
Makes sense. Thanks for articulating the use case logic, Rich. |
Leaving this here for anyone else who happens to stumble across this thread while trying to solve the same build hang that I've been chasing.
|
Rich
I must be missing something basic.
I have a module
foo.js
:In my
main.js
I import it successfully :import { fooTest } from "foo";
But if I try to import from within another module, say,
foo2.js
:import { fooTest } from "foo";
This hangs rollup. What is the stupid thing I am doing wrong?? I'm following this ES6 syntax.
The text was updated successfully, but these errors were encountered: