Some dependencies make use of async imports: import('module-name').then((defaultExport) => {})
Students who run into this issue are hit particularly hard, as it's not obvious why installing a module would cause this bug. Also it involves path construction issues which are particularly difficult to master.
This results in chunked bundles 0.bundle.js.
As configured, webpack will assume these should be fetched as GET /public/0.bundle.js
But the URL should be GET /0.bundle.js.
[x] support serving split bundles in development mode
[x] support deploying split bundles in production mode (will require update to deploy script to find these file)
[x] manually verify deploy script works with a chunked bundle
[x] ~try out with use-sound library, which seems to trigger a chunked build~
Some dependencies make use of async imports:
import('module-name').then((defaultExport) => {})
Students who run into this issue are hit particularly hard, as it's not obvious why installing a module would cause this bug. Also it involves path construction issues which are particularly difficult to master.
This results in chunked bundles
0.bundle.js
.As configured, webpack will assume these should be fetched as
GET /public/0.bundle.js
But the URL should be
GET /0.bundle.js
.use-sound
library, which seems to trigger a chunked build~import('./local-path').then
Deployed here: https://nameless-fjord-30998.herokuapp.com/
Used this async import:
npm run deploy
shows multipart bundle being added: