Closed Tommertom closed 4 years ago
Hi @Tommertom
Thanks for catching this bug. I'll see if I can push a fix tonight. I'll remove the shortcode and maybe change it to -c for code-splitting or -D if the shortcode is case sensitive.
Fixed in the latest release. I'll update the docs and include some instructions on how to implement code-splitting.
Draft here of how to implement code splitting.
https://routify.now.sh/docs/codesplitting
Let me know how it goes.
Works like a charm!
Posted in a repo. For sake of reference. https://github.com/Tommertom/Routify-code-splitting-debugging
Initially I did not follow all your guides (forgot about rollup-changes). But then it worked.
Please note, you may want to say that you need to remove the line in rollup.config.js: file: 'public/build/bundle.js',
and replace it with dir: 'public/bundle'
. Can't have both, and your guide may lead to issues for the not-so-experienced rollup-person (like me).
[!] Error: You must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks.
Nice work! Going to integrate in my project
Hi
I downloaded the starter template and changed
package.json
to enable the code splitting:This yields an error:
What should I do to test the code splitting?
By the way, the config documentation shows duplicate shortcode flag
-d
. One for debug--debug
and one for code splitting--dynamic-imports
. You may want to disambigue this?https://routify.now.sh/docs/config#