Steal-tools with steal.import


#1

Hi everybody,

I have a problem with steal-tools when building my application.
In details, steal-tools work great when I have to import modules that uses AMD/ES6 (import/require) or using the <can-import from="/path/to/module" /> tag in the stache template, but I cannot figure out how to properly build the application when I want to dinamically load the module, using steal.import(“moduleName”).done() command.

When I use the steal.import() way, since it’s done at run-time, the required file will be missing.

Is there any way to solve this using steal-tools?

Thank you.


#2

Hi @fp_dev, you probably need to set the bundle option in your build configuration so that steal-tools will create bundles for each of the modules you’re progressively loading.

Take a look at https://stealjs.com/docs/StealJS.guides.progressive_loading.html and https://stealjs.com/docs/config.bundle.html.


#3

Thank you @phillipskevin! This solve my issue! Great!