ES6 Modules - Supercharged

preview_player
Показать описание
Surma shows you how to progressively enhance for browsers with native module support.

If you have questions or suggestions, hit us up on Twitter!

Рекомендации по теме
Комментарии
Автор

Ooooops, I slipped up! ES6 Module are in Chrome 61, not 60.

dassurma
Автор

But surely using a monolith javascript module goes against the PRPL pattern? We ideally want to use bundled modules that are also code split into more relevant bundles that can be loaded as they are needed. I do not think rollup supports this functionality yet.

__silverbadger
Автор

But how would <script module="..."> replace the `import Module from 'mymodule';` ?? If i add `<script module="mymodule.js">` in my site would the import work?

javisvperez
Автор

can you (or anyone) please give me a reference to babel or rollup thing please?! ( I only need the importing part I'm already using babel but I couldn't fix the importing issue)
thank you :)

mohebnia
Автор

All good until everyone thinking oh I've been using Es6 modules with webpack for ages this should be easy! To discover webpack Es6 isn't standard with its non relative urls 😂

griffadev