@s-ui/bundler 8.0.0-beta.21 → 8.0.0-beta.25
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/package.json +11 -10
- package/shared/minify-js.js +8 -8
- package/webpack.config.dev.js +1 -0
- package/webpack.config.lib.js +12 -6
- package/webpack.config.prod.js +13 -9
- package/webpack.config.server.js +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s-ui/bundler",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.25",
|
|
4
4
|
"description": "Config-free bundler for ES6 React apps.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sui-bundler": "./bin/sui-bundler.js"
|
|
@@ -21,34 +21,35 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/SUI-Components/sui/tree/master/packages/sui-bundler#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/core": "7.16.
|
|
24
|
+
"@babel/core": "7.16.7",
|
|
25
25
|
"@s-ui/helpers": "1",
|
|
26
26
|
"@s-ui/sass-loader": "1",
|
|
27
27
|
"address": "1.1.2",
|
|
28
|
-
"autoprefixer": "10.4.
|
|
28
|
+
"autoprefixer": "10.4.2",
|
|
29
29
|
"babel-loader": "8.2.3",
|
|
30
30
|
"babel-preset-sui": "3",
|
|
31
|
+
"buffer": "6.0.3",
|
|
31
32
|
"commander": "8.3.0",
|
|
32
33
|
"css-loader": "6.5.1",
|
|
33
34
|
"css-minimizer-webpack-plugin": "3.3.1",
|
|
34
|
-
"esbuild
|
|
35
|
+
"esbuild": "0.14.11",
|
|
35
36
|
"escape-string-regexp": "4.0.0",
|
|
36
|
-
"fast-glob": "3.2.
|
|
37
|
+
"fast-glob": "3.2.10",
|
|
37
38
|
"find-free-ports": "3.0.0",
|
|
38
39
|
"html-webpack-plugin": "5.5.0",
|
|
39
|
-
"mini-css-extract-plugin": "2.4.
|
|
40
|
+
"mini-css-extract-plugin": "2.4.6",
|
|
40
41
|
"postcss": "8.4.5",
|
|
41
42
|
"postcss-loader": "6.2.1",
|
|
42
43
|
"process": "0.11.10",
|
|
43
44
|
"rimraf": "3.0.2",
|
|
44
|
-
"sass": "1.
|
|
45
|
+
"sass": "1.48.0",
|
|
45
46
|
"speed-measure-webpack-plugin": "1.5.0",
|
|
46
47
|
"strip-ansi": "6.0.1",
|
|
47
48
|
"style-loader": "3.3.1",
|
|
48
49
|
"url": "0.11.0",
|
|
49
|
-
"webpack": "5.
|
|
50
|
-
"webpack-dev-server": "4.7.
|
|
51
|
-
"webpack-manifest-plugin": "4.
|
|
50
|
+
"webpack": "5.66.0",
|
|
51
|
+
"webpack-dev-server": "4.7.3",
|
|
52
|
+
"webpack-manifest-plugin": "4.1.1",
|
|
52
53
|
"webpack-node-externals": "3.0.0"
|
|
53
54
|
}
|
|
54
55
|
}
|
package/shared/minify-js.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
const esbuild = ({sourceMap}) =>
|
|
4
|
-
new ESBuildMinifyPlugin({
|
|
5
|
-
target: 'es6',
|
|
6
|
-
sourcemap: sourceMap !== 'none' && sourceMap !== false
|
|
7
|
-
})
|
|
1
|
+
const TerserPlugin = require('terser-webpack-plugin')
|
|
8
2
|
|
|
9
3
|
module.exports = ({extractComments, sourceMap}) =>
|
|
10
|
-
|
|
4
|
+
new TerserPlugin({
|
|
5
|
+
minify: TerserPlugin.esbuildMinify,
|
|
6
|
+
terserOptions: {
|
|
7
|
+
target: 'es6',
|
|
8
|
+
sourcemap: sourceMap !== 'none' && sourceMap !== false
|
|
9
|
+
}
|
|
10
|
+
})
|
package/webpack.config.dev.js
CHANGED
package/webpack.config.lib.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
const webpack = require('webpack')
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
cleanList,
|
|
4
|
+
envVars,
|
|
5
|
+
MAIN_ENTRY_POINT,
|
|
6
|
+
config
|
|
7
|
+
} = require('./shared/index.js')
|
|
3
8
|
const path = require('path')
|
|
4
|
-
const minifyJs = require('./shared/minify-js')
|
|
5
|
-
const definePlugin = require('./shared/define')
|
|
6
|
-
const babelRules = require('./shared/module-rules-babel')
|
|
7
|
-
const {extractComments, sourceMap} = require('./shared/config')
|
|
8
|
-
const {aliasFromConfig} = require('./shared/resolve-alias')
|
|
9
|
+
const minifyJs = require('./shared/minify-js.js')
|
|
10
|
+
const definePlugin = require('./shared/define.js')
|
|
11
|
+
const babelRules = require('./shared/module-rules-babel.js')
|
|
12
|
+
const {extractComments, sourceMap} = require('./shared/config.js')
|
|
13
|
+
const {aliasFromConfig} = require('./shared/resolve-alias.js')
|
|
9
14
|
|
|
10
15
|
module.exports = {
|
|
11
16
|
mode: 'production',
|
|
@@ -30,6 +35,7 @@ module.exports = {
|
|
|
30
35
|
optimization: {
|
|
31
36
|
// avoid looping over all the modules after the compilation
|
|
32
37
|
checkWasmTypes: false,
|
|
38
|
+
minimize: true,
|
|
33
39
|
minimizer: [minifyJs({extractComments, sourceMap})]
|
|
34
40
|
},
|
|
35
41
|
plugins: cleanList([
|
package/webpack.config.prod.js
CHANGED
|
@@ -9,21 +9,22 @@ const {WebpackManifestPlugin} = require('webpack-manifest-plugin')
|
|
|
9
9
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
10
10
|
const InlineChunkHtmlPlugin = require('./shared/inline-chunk-html-plugin.js')
|
|
11
11
|
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin')
|
|
12
|
+
|
|
12
13
|
const {
|
|
13
14
|
when,
|
|
14
15
|
cleanList,
|
|
15
16
|
envVars,
|
|
16
17
|
MAIN_ENTRY_POINT,
|
|
17
18
|
config
|
|
18
|
-
} = require('./shared/index')
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const babelRules = require('./shared/module-rules-babel')
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
19
|
+
} = require('./shared/index.js')
|
|
20
|
+
const {aliasFromConfig} = require('./shared/resolve-alias.js')
|
|
21
|
+
const {extractComments, sourceMap} = require('./shared/config.js')
|
|
22
|
+
const {resolveLoader} = require('./shared/resolve-loader.js')
|
|
23
|
+
const babelRules = require('./shared/module-rules-babel.js')
|
|
24
|
+
const definePlugin = require('./shared/define.js')
|
|
25
|
+
const manifestLoaderRules = require('./shared/module-rules-manifest-loader.js')
|
|
26
|
+
const minifyCss = require('./shared/minify-css.js')
|
|
27
|
+
const minifyJs = require('./shared/minify-js.js')
|
|
27
28
|
|
|
28
29
|
const PUBLIC_PATH = process.env.CDN || config.cdn || '/'
|
|
29
30
|
|
|
@@ -70,6 +71,9 @@ const webpackConfig = {
|
|
|
70
71
|
runtimeChunk: true
|
|
71
72
|
},
|
|
72
73
|
plugins: cleanList([
|
|
74
|
+
new webpack.ProvidePlugin({
|
|
75
|
+
process: 'process/browser'
|
|
76
|
+
}),
|
|
73
77
|
new webpack.ids.HashedModuleIdsPlugin(),
|
|
74
78
|
new webpack.EnvironmentPlugin(envVars(config.env)),
|
|
75
79
|
definePlugin(),
|
package/webpack.config.server.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const webpack = require('webpack')
|
|
2
2
|
const webpackNodeExternals = require('webpack-node-externals')
|
|
3
3
|
const path = require('path')
|
|
4
|
-
const babelRules = require('./shared/module-rules-babel')
|
|
5
|
-
const manifestLoaderRules = require('./shared/module-rules-manifest-loader')
|
|
6
|
-
const {aliasFromConfig} = require('./shared/resolve-alias')
|
|
7
4
|
|
|
8
|
-
const {config, when, cleanList} = require('./shared')
|
|
9
|
-
const
|
|
5
|
+
const {config, when, cleanList} = require('./shared/index.js')
|
|
6
|
+
const babelRules = require('./shared/module-rules-babel.js')
|
|
7
|
+
const manifestLoaderRules = require('./shared/module-rules-manifest-loader.js')
|
|
8
|
+
const {aliasFromConfig} = require('./shared/resolve-alias.js')
|
|
9
|
+
const {resolveLoader} = require('./shared/resolve-loader.js')
|
|
10
10
|
|
|
11
11
|
const filename = '[name].[chunkhash:8].js'
|
|
12
12
|
|
|
@@ -31,6 +31,7 @@ const webpackConfig = {
|
|
|
31
31
|
},
|
|
32
32
|
optimization: {
|
|
33
33
|
checkWasmTypes: false,
|
|
34
|
+
minimize: true,
|
|
34
35
|
nodeEnv: false
|
|
35
36
|
},
|
|
36
37
|
externals: [webpackNodeExternals()],
|