Add CRA 5 production build guidance - #741
Conversation
zdrawku
left a comment
There was a problem hiding this comment.
@PVillarmarzo, please address this:
- Markdown list is broken by the unindented code fences.
The fenced blocks in steps 2 and 3 start at column 0, which closes the ordered list. As rendered, the <script> snippet and the config.externals snippet fall outside the list, and step 3/4 restart numbering at 1. instead of continuing. Indenting the continuation content by 3 spaces keeps them inside their list items:
Suggestions:
-
Add the IIFE bundle to
public/index.html:<script src="%PUBLIC_URL%/reveal/reveal-sdk.js"></script>
-
Configure Webpack externals in your CRA override:
config.externals = { ...(config.externals || {}), "reveal-sdk": "Reveal", };
Same treatment is needed for steps 1 and 4.
-
The CRA override assumes the reader is already on
cracoorreact-app-rewired, but stock CRA has no override hook, so this step is a dead end for them, no? Naming the tool and the file (e.g.craco.config.jsviawebpack.configure) would make it actionable. @MLopezIG what do you think? -
Add JP equivalent of your changes please
|
Thanks! I addressed the review feedback and pushed the updates. Fixed the Markdown list nesting. The docs build passes for both EN and JA. |
Summary
Adds documentation for the Create React App 5 production-build compatibility issue when consuming Reveal SDK from npm.
Changes
externals+ self-hosted IIFE workaround.Validation
git diff --check