Webpack4 + splitChunks + multiple portals, how to achieve the common code in the public folder, the entry public code in the portal folder?

problem description

my application is a multi-page application. The entry is
src/a/index.js
src/b/index.js

.

a pages are packaged into a.js
b pages and packaged into b.js
, where entrances an and b have common codes x.js
a, common codes x-a.js
b, common codes x-b.js

I now want to achieve the effect of output as follows
build/x.js

build/a/a.js
build/a/x-a.js

build/b/b.js
build/b/x-b.sj

the description of the problem is abstract. Do you understand it? Is it feasible?


is certainly possible, and can be achieved by customizing plug-ins.
but it doesn't make much sense, because the generated file itself is not managed by us, and we don't really need to know how it was generated.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b371d0-e5b9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b371d0-e5b9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?