@s-ui/bundler 8.0.0-beta.25 → 8.0.0-beta.27
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const webpack = require('webpack')
|
|
2
|
-
const formatWebpackMessages = require('../utils/formatWebpackMessages')
|
|
3
|
-
const clearConsole = require('../utils/clearConsole')
|
|
4
|
-
const log = require('../shared/log')
|
|
2
|
+
const formatWebpackMessages = require('../utils/formatWebpackMessages.js')
|
|
3
|
+
const clearConsole = require('../utils/clearConsole.js')
|
|
4
|
+
const log = require('../shared/log.js')
|
|
5
5
|
|
|
6
6
|
const isInteractive = process.stdout.isTTY
|
|
7
7
|
|
|
@@ -14,7 +14,7 @@ const printInstructions = ({urls}) =>
|
|
|
14
14
|
module.exports = (config, urls) => {
|
|
15
15
|
let compiler
|
|
16
16
|
try {
|
|
17
|
-
compiler = webpack(config)
|
|
17
|
+
compiler = webpack(config, () => {})
|
|
18
18
|
} catch (err) {
|
|
19
19
|
log.error(`✖ Failed to compile:\n ${err.message || err}`)
|
|
20
20
|
process.exit(1)
|
|
@@ -8,11 +8,8 @@ const protocol = HTTPS === 'true' ? 'https' : 'http'
|
|
|
8
8
|
const host = HOST || '0.0.0.0'
|
|
9
9
|
|
|
10
10
|
const getWatchOptions = ({context, watch}) => {
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
ignored: ignoredFiles(context)
|
|
14
|
-
}
|
|
15
|
-
: false
|
|
11
|
+
if (!watch) return false
|
|
12
|
+
return {ignored: ignoredFiles(context)}
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
module.exports = config => ({
|
|
@@ -35,9 +32,11 @@ module.exports = config => ({
|
|
|
35
32
|
historyApiFallback: {
|
|
36
33
|
disableDotRule: true
|
|
37
34
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
setupMiddlewares(middlewares, devServer) {
|
|
36
|
+
if (!devServer) throw new Error('webpack-dev-server is not defined')
|
|
37
|
+
|
|
38
|
+
middlewares.push(noopServiceWorkerMiddleware(config.output.publicPath))
|
|
39
|
+
|
|
40
|
+
return middlewares
|
|
42
41
|
}
|
|
43
42
|
})
|