Bundling `@duetds/date-picker` with Rollup doesn't work
See original GitHub issueDescribe the bug
Currently @duetds/date-picker
does not work with Rollup (or I didn’t get it to).
The problem appears to be a dynamic import statement with a template string:
return import(`./${bundleId}.entry.js${""}`);
Rollup seems to ignore these imports: “Dynamic imports on runtime are ignored by Rollup #2463”
To Reproduce Clone this repository https://github.com/sto3psl/rollup-duet-date-picker and follow the steps to create a bundle.
Expected behavior
<duet-date-picker></duet-date-picker>
should render in the browser with no errors.
Desktop (please complete the following information):
- OS: macOS 10.15.6
- Browser: all of them
I’m not sure if this problem comes through duetds/date-picker
or Stencil.js or the way everything is published.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Why does bundling with Rollup and linking packages ...
Everything works in the component library + Storybook, but when I bundle with Rollup and link the local package ( npm link )...
Read more >Open Source Version Of Duet Design System's Accessible ...
The final step is to load and register Duet Date Picker in the browser. @duetds/date-picker includes a main function that handles this.
Read more >Changelog
Tooltip: fix bug where an open tooltip would not close if you click on the trigger button. Tooltip: improve focus management. 4.15.1 #....
Read more >graphiteds/core - npm Package Health Analysis
Note: All components are part of your bundle, but only lazy-loaded by the browser when ... This doesn't work --> <gr-input v-model="name"></gr-input> <!...
Read more >Untitled
Suzuki piano book 7, Solo cup lighthouse, Ghq rawalpindi jobs dec 2014, ... Golden retriever puppy doesn't bark, Seerat un nabi ibn kathir...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, that works flawlessly! Thanks @WickyNilliams!
I updated my repository and added a note with the “fix” if anyone else runs into this issue. I think it would be great to make it more clear in the docs that the single file bundle is supposed to be used with bundlers and that it also exports
defineCustomElements
.I’ll reopen this to track the docs changes 😃
It indirectly contains a dynamic import, as it statically imports
@stencil/core/internal
, which itself contains a dynamic import