@s-ui/bundler 8.0.0-beta.0 → 8.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -8
- package/bin/sui-bundler-analyzer.js +9 -3
- package/bin/sui-bundler-build.js +1 -1
- package/bin/sui-bundler-dev.js +70 -33
- package/factories/createCompiler.js +23 -7
- package/factories/createDevServerConfig.js +37 -0
- package/loaders/linkLoaderConfigBuilder.js +4 -3
- package/package.json +23 -21
- package/shared/config.js +2 -0
- package/{plugins/InlineChunkHtmlPlugin.js → shared/inline-chunk-html-plugin.js} +2 -0
- package/shared/log.js +6 -7
- package/shared/minify-css.js +3 -1
- package/shared/minify-js.js +18 -2
- package/shared/module-rules-babel.js +2 -0
- package/shared/resolve-alias.js +1 -0
- package/utils/checkRequiredFiles.js +31 -0
- package/utils/clearConsole.js +14 -0
- package/utils/formatWebpackMessages.js +126 -0
- package/webpack.config.dev.js +18 -19
- package/webpack.config.lib.js +3 -1
- package/webpack.config.prod.js +25 -17
- package/webpack.config.server.js +2 -1
- package/CHANGELOG.md +0 -1463
- package/shared/optimization-split-chunks.js +0 -31
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const {config} = require('./')
|
|
2
|
-
|
|
3
|
-
const hasToSplitFrameworksOnChunk =
|
|
4
|
-
config.optimizations && config.optimizations.splitFrameworkOnChunk
|
|
5
|
-
|
|
6
|
-
const frameworkSplitChunk = {
|
|
7
|
-
framework: {
|
|
8
|
-
chunks: 'all',
|
|
9
|
-
name: 'framework',
|
|
10
|
-
// This regex ignores nested copies of framework libraries so they're
|
|
11
|
-
// bundled with their issuer: https://github.com/vercel/next.js/pull/9012
|
|
12
|
-
test: /(?<!node_modules.*)[\\/]node_modules[\\/](react|react-dom|scheduler|prop-types|use-subscription)[\\/]/,
|
|
13
|
-
priority: 40,
|
|
14
|
-
// Don't let webpack eliminate this chunk (prevents this chunk from
|
|
15
|
-
// becoming a part of the commons chunk)
|
|
16
|
-
enforce: true
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
exports.splitChunks = {
|
|
21
|
-
cacheGroups: {
|
|
22
|
-
...(hasToSplitFrameworksOnChunk && frameworkSplitChunk),
|
|
23
|
-
vendor: {
|
|
24
|
-
chunks: 'all',
|
|
25
|
-
name: 'vendor',
|
|
26
|
-
test: 'vendor',
|
|
27
|
-
enforce: true,
|
|
28
|
-
reuseExistingChunk: true
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|