Akryum / vue-cli-plugin-ssr

:sparkles: Simple SSR plugin for Vue CLI
https://vue-cli-plugin-ssr.netlify.com/
MIT License
444 stars 69 forks source link

[WIP] Add modern mode #199

Open phil294 opened 4 years ago

phil294 commented 4 years ago

Fixes #28

912dcb7dd52746d4 Outputs for example

/dist/js/app.27e17d15.js
/dist/js/app.27e17d15.js.map
/dist/js/app-legacy.00aa67e8.js
/dist/js/app-legacy.00aa67e8.js.map
etc.

and

<html>
[...]
<!--vue-ssr-outlet-->
{{{ renderState() }}}
{{{ renderScripts() }}}
<script type=module src=/js/chunk-vendors.a9109a24.js></script>
<script type=module src=/js/app.27e17d15.js></script>
<script src=/js/safari-nomodule-fix.js></script>
<script src=/js/chunk-vendors-legacy.3b5a3d7d.js nomodule></script>
<script src=/js/app-legacy.00aa67e8.js nomodule></script>
</body></html>

Just like a normal non-ssr --modern build. Couple problems persist, I'll just review my own pull request below for code comments