Replies: 1 comment
-
Sorry for delay, is it still valid? If yes, can you create reproducible test repo? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
have a small koa app bundled with webpack@5
the config may like
the build is ok and
index.js
works finethe webpack runtime code is in
koa.js
index.js
importkoa.js
with require likevar __webpack_require__ = require("./koa.js");
but if there are more chunks like
the build is also ok but throw error while running
index.js
this time both
koa.js
androuter.js
have its own runtimeand
__webpack_require__.X(0, ["router"],...)
will not find chunkrouter.js
inkoa.js
GetChunkFilenameRuntimeModule
returnsundefined
in both runtimethe runtime find neither
koa.js
norrouter.js
while setoptimization.runtimeChunk
tosingle
it works fine if use
optimization.splitChunks
instead ofentry.dependOn
GetChunkFilenameRuntimeModule
will return${chunkId}.js
and runtime could get the chunkbut the dependences of
koa
and@koa/router
are bundled inindex.js
which is a little unacceptableany ideas
Beta Was this translation helpful? Give feedback.
All reactions