When I edit:
switch(page) {
case 'view1':
import('../components/my-view1.js').then((module) => {
// Put code in here that you want to run every time when
// navigating to view1 after my-view1.js is loaded.
});
break;
case 'view2':
import('../components/my-view2.js');
break;
To:
case 'view1':
import('../components/my-view1.js').then((module) => {
// Put code in here that you want to run every time when
// navigating to view1 after my-view1.js is loaded.
});
import('../components/my-view2.js');
break;
case 'view2':
import('../components/my-view2.js');
break;
The resulting shell bundle (my-app.js) doesn't export some identifiers used by the fragments like LitElement and html.
@usergenic any news about this? 馃檪
This is a serious bug, not very encouraging that it's been open since july :(
Strangely hit this two days ago and it took a while to unwind it
FWIW, working on this via Polymer/tools#722 - rollup has some unfortunate assumptions and its own new logic around deduplicating dynamic imports that I'm attempting to get around. Solution soon.
Filed a bug on rollup https://github.com/rollup/rollup/issues/2487
Filed a bug on rollup https://github.com/rollup/rollup/issues/2487
Filed another bug on rollup https://github.com/rollup/rollup/issues/2489
Most helpful comment
This is a serious bug, not very encouraging that it's been open since july :(