Closed mjstahl closed 5 years ago
Assuming an imported file helpers/helpers.js that includes a handfull of imports like so:
helpers/helpers.js
// helpers/helpers.js import 'a.js' import 'b.js'
In a stache file, use can-import to import the helpers file
can-import
<!-- index.stache --> <can-import from="~/helpers/" />
When loading that stache file the following error will occur.
This error occurs at https://github.com/stealjs/steal/blob/2488567bcb55a38958ba3877a280ad7202d3e28c/src/extension-tree-shaking.js#L106 because parentImportNames (parentLoad.metadata.importNames) is undefined.
parentImportNames
parentLoad.metadata.importNames
A work around for this is to name the imports.
// helpers/helpers.js import A from 'a.js' import B from 'b.js'
Assuming an imported file
helpers/helpers.js
that includes a handfull of imports like so:In a stache file, use
can-import
to import the helpers fileWhen loading that stache file the following error will occur.
This error occurs at https://github.com/stealjs/steal/blob/2488567bcb55a38958ba3877a280ad7202d3e28c/src/extension-tree-shaking.js#L106 because
parentImportNames
(parentLoad.metadata.importNames
) is undefined.A work around for this is to name the imports.