@s-ui/bundler 9.60.0 → 9.61.0-beta.0
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/bin/sui-bundler-dev.js
CHANGED
|
@@ -39,6 +39,7 @@ if (!module.parent) {
|
|
|
39
39
|
[]
|
|
40
40
|
)
|
|
41
41
|
.option('-w, --watch', 'Watch files and restart the server on change', DEFAULT_WATCH)
|
|
42
|
+
.option('-y, --overlay', 'Show error overlay')
|
|
42
43
|
.on('--help', () => {
|
|
43
44
|
console.log(' Examples:')
|
|
44
45
|
console.log('')
|
|
@@ -66,7 +67,7 @@ const start = async ({config = webpackConfig, packagesToLink = program.opts().li
|
|
|
66
67
|
const port = await choosePort(DEFAULT_PORT)
|
|
67
68
|
const urls = prepareUrls(protocol, HOST, port)
|
|
68
69
|
|
|
69
|
-
const {linkAll} = program.opts()
|
|
70
|
+
const {linkAll, overlay = false} = program.opts()
|
|
70
71
|
|
|
71
72
|
const configVars = JSON.stringify({packagesToLink, linkAll})
|
|
72
73
|
const version = `${__dirname}|${configVars}`
|
|
@@ -81,7 +82,7 @@ const start = async ({config = webpackConfig, packagesToLink = program.opts().li
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
const compiler = createCompiler(nextConfig, urls)
|
|
84
|
-
const serverConfig = createDevServerConfig(nextConfig,
|
|
85
|
+
const serverConfig = createDevServerConfig({config: nextConfig, overlay})
|
|
85
86
|
const devServer = new WebpackDevServer(
|
|
86
87
|
{
|
|
87
88
|
...serverConfig,
|
|
@@ -7,20 +7,26 @@ const {HOST, HTTPS} = process.env
|
|
|
7
7
|
const protocol = HTTPS === 'true' ? 'https' : 'http'
|
|
8
8
|
const host = HOST || '0.0.0.0'
|
|
9
9
|
|
|
10
|
+
const getOverlayValue = overlay => {
|
|
11
|
+
return overlay
|
|
12
|
+
? {
|
|
13
|
+
errors: true,
|
|
14
|
+
warnings: false
|
|
15
|
+
}
|
|
16
|
+
: false
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
const getWatchOptions = ({context, watch}) => {
|
|
11
20
|
if (!watch) return false
|
|
12
21
|
return {ignored: ignoredFiles(context)}
|
|
13
22
|
}
|
|
14
23
|
|
|
15
24
|
/** @returns {import('webpack-dev-server').Configuration} */
|
|
16
|
-
module.exports = config => ({
|
|
25
|
+
module.exports = ({config, overlay}) => ({
|
|
17
26
|
allowedHosts: 'all',
|
|
18
27
|
client: {
|
|
19
28
|
logging: 'none',
|
|
20
|
-
overlay:
|
|
21
|
-
errors: true,
|
|
22
|
-
warnings: false
|
|
23
|
-
},
|
|
29
|
+
overlay: getOverlayValue(overlay),
|
|
24
30
|
progress: false
|
|
25
31
|
},
|
|
26
32
|
// Enable gzip compression of generated files
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s-ui/bundler",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.61.0-beta.0",
|
|
4
4
|
"description": "Config-free bundler for ES6 React apps.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sui-bundler": "./bin/sui-bundler.js"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"style-loader": "3.3.1",
|
|
56
56
|
"swc-loader": "0.2.1",
|
|
57
57
|
"url": "0.11.0",
|
|
58
|
-
"webpack-dev-server": "
|
|
58
|
+
"webpack-dev-server": "5.0.4",
|
|
59
59
|
"webpack-manifest-plugin": "5.0.0",
|
|
60
60
|
"webpack-node-externals": "3.0.0",
|
|
61
61
|
"webpack": "5.82.1"
|