-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Failure exporting imported sub-modules #430
Comments
Tests still failing; depends on rollup/rollup#430
Fixed in 0.24.1 – thanks |
🍻 |
I think this is still a problem in 0.25.4: Link to minimal reproduction http://bit.ly/1UpzaOC If this is a different problem, please yell at me and I'll open a new issue. index.js: generates (globals):
|
Good point @christopherthielen – One can see the problem exhibiting from your example, on rollupjs.org |
Since this is still an issue as of 0.34, here is a temporary workaround for anyone who was caught by this like I was: main.js: |
As far as I can tell this is fixed in recent versions – I remember us fixing something similar, so that all makes sense. Will close this (again! 😀 ) |
Tests still failing; depends on rollup/rollup#430
Minimal Working Example
tl;dr A minimal example exhibiting the problem is:
entry.js
package.js
sub.js
Running
rollup entry.js
gives:Where
pkg.sub
should beObject.freeze({wink: wink})
Running
rollup package.js
works as expected.For some more context, see below.
In the package tko.utils, I have the following code:
spec/utilsDomBehaviors.js
index.js
This compiles as-expected when running
rollup index.js
(or the equivalent gulp task,gulp make
).However, a problem exhibits when I run, from the project root (or from the
spec
directory, with theentry
changed accordingly):The
shim
imports fine, and the thearray
imports/exports as expected.However, resulting code does not contain either
virtualElements
ordomData
. One would expect it to be anObject.freeze...
.The objects are referenced in the export part as:
The problem also occurs when using
bundle.write
, and regardless of the output format.This issue prevents the easy use of the
karma-rollup-preprocessor
plugin.The text was updated successfully, but these errors were encountered: