@s-ui/bundler 8.0.0-beta.3 → 8.0.0-beta.4

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.
@@ -25,7 +25,8 @@ const linkLoaderConfigBuilder = require('../loaders/linkLoaderConfigBuilder')
25
25
  const log = require('../shared/log')
26
26
 
27
27
  const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000
28
- const HOST = process.env.HOST || '0.0.0.0'
28
+ const {CI = false, HOST = '0.0.0.0'} = process.env
29
+ const DEFAULT_WATCH = !CI
29
30
 
30
31
  if (!module.parent) {
31
32
  program
@@ -43,6 +44,11 @@ if (!module.parent) {
43
44
  },
44
45
  []
45
46
  )
47
+ .option(
48
+ '-w, --watch',
49
+ 'Watch files and restart the server on change',
50
+ DEFAULT_WATCH
51
+ )
46
52
  .on('--help', () => {
47
53
  console.log(' Examples:')
48
54
  console.log('')
@@ -52,6 +58,7 @@ if (!module.parent) {
52
58
  console.log('')
53
59
  })
54
60
  .parse(process.argv)
61
+
55
62
  const {context} = program
56
63
  webpackConfig.context = context || webpackConfig.context
57
64
  }
@@ -7,6 +7,14 @@ 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 getWatchOptions = ({context, watch}) => {
11
+ return watch
12
+ ? {
13
+ ignored: ignoredFiles(context)
14
+ }
15
+ : false
16
+ }
17
+
10
18
  module.exports = config => ({
11
19
  allowedHosts: 'all',
12
20
  client: {
@@ -19,9 +27,7 @@ module.exports = config => ({
19
27
  },
20
28
  static: {
21
29
  directory: 'public',
22
- watch: {
23
- ignored: ignoredFiles(config.context)
24
- }
30
+ watch: getWatchOptions(config)
25
31
  },
26
32
  hot: true,
27
33
  https: protocol === 'https',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s-ui/bundler",
3
- "version": "8.0.0-beta.3",
3
+ "version": "8.0.0-beta.4",
4
4
  "description": "Config-free bundler for ES6 React apps.",
5
5
  "bin": {
6
6
  "sui-bundler": "./bin/sui-bundler.js"
@@ -27,7 +27,7 @@
27
27
  "autoprefixer": "10.4.0",
28
28
  "babel-loader": "8.2.3",
29
29
  "babel-preset-sui": "3",
30
- "commander": "6.2.1",
30
+ "commander": "8.3.0",
31
31
  "css-loader": "6.5.1",
32
32
  "css-minimizer-webpack-plugin": "3.1.3",
33
33
  "esbuild-loader": "2.16.0",
@@ -42,8 +42,8 @@
42
42
  "sass": "1.43.4",
43
43
  "speed-measure-webpack-plugin": "1.5.0",
44
44
  "style-loader": "3.3.1",
45
- "webpack": "5.61.0",
46
- "webpack-dev-server": "4.4.0",
45
+ "webpack": "5.64.1",
46
+ "webpack-dev-server": "4.5.0",
47
47
  "webpack-manifest-plugin": "4.0.2",
48
48
  "webpack-node-externals": "3.0.0"
49
49
  }