-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bug while importing packages with lazy loading #40
Comments
How about importing like
|
@ardatan the same result. |
Could you share the result of |
@ardatan |
So, it is not undefined and returns empty object. It doesn’t look like related to meteor-webpack; because there is no export in it. |
@ardatan Any ideas why it happened? I clearly see export in main Astronomy file
|
Could you reproduce a repo about this bug? |
@ardatan looks like this bug not with jagi:astronomy but with meteor lazy loading. The latest version of jagi:astronomy start using lazy loading. Old version jagi:[email protected] without lazy loading works fine with webpack. I guess this bug affects all packages which use lazy loading. |
As a workaround for jagi astronomy I created a local package in This does mean, that all advantages of lazy loading are gone. Code: // ./packages/disable-dynimport/package.js
Package.describe({
name: "disable-dynimport",
summary: "dynimports => static imports",
version: "0.0.1",
});
Package.onUse(function (api, where) {
api.use(['ecmascript', 'jagi:astronomy',]);
api.addFiles(["main.js"]);
});
// packages/disable-dynimport/main.js
import Astro from 'meteor/jagi:astronomy'
Object.keys(Astro).forEach(key => {
Package['jagi:astronomy'][key] = Astro[key]
})
// .meteor/packages
// append "disable-dynimport" Not a solution, but a working workaround. Better then nothing... |
I have configured webpack and it works well, but when i try to import jagi:astronomy empty object is the result of the import. At the same time i can import reywood:publish-composite and other packages. Example
Any ideas why it happened and how to fix it
Thx!
The text was updated successfully, but these errors were encountered: