@s-ui/bundler 8.0.0-beta.30 → 8.0.0-beta.34

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 CHANGED
@@ -171,7 +171,6 @@ This tool works with zero configuration out the box but you could use some confi
171
171
  "alias": {
172
172
  "react": "preact"
173
173
  },
174
- "measure": true,
175
174
  "offline": true,
176
175
  "targets": {
177
176
  "chrome": "41",
@@ -213,10 +212,6 @@ You should pass a handler in order to handle when content gets cached for the fi
213
212
 
214
213
  If you want to remove your ServiceWorker, you need to use the method `unregister`, the same way you used the `register` method before.
215
214
 
216
- ### Build time measurement
217
-
218
- Set `measure` to `true` if you want to check step by step build times.
219
-
220
215
  ### Only Caching
221
216
 
222
217
  It's possible to create a service worker that caches all static resources
@@ -28,14 +28,10 @@ program
28
28
  )
29
29
  .parse(process.argv)
30
30
 
31
- const {
32
- clean = false,
33
- output,
34
- umd = false,
35
- path: publicPath,
36
- args: [entry],
37
- root = false
38
- } = program.opts()
31
+ const [entry] = program.args
32
+ const options = program.opts()
33
+ const {clean = false, output, umd = false, root = false} = options
34
+ const publicPath = options.path
39
35
 
40
36
  if (!output) {
41
37
  showError(new Error('--output is mandatory.'), program)
@@ -1,8 +1,8 @@
1
1
  const fg = require('fast-glob')
2
2
  const path = require('path')
3
3
 
4
- const log = require('../shared/log')
5
- const {defaultAlias} = require('../shared/resolve-alias')
4
+ const log = require('../shared/log.js')
5
+ const {defaultAlias} = require('../shared/resolve-alias.js')
6
6
  const createSassLinkImporter = require('./sassLinkImporter.js')
7
7
 
8
8
  const diccFromAbsolutePaths = (paths, init = {}) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s-ui/bundler",
3
- "version": "8.0.0-beta.30",
3
+ "version": "8.0.0-beta.34",
4
4
  "description": "Config-free bundler for ES6 React apps.",
5
5
  "bin": {
6
6
  "sui-bundler": "./bin/sui-bundler.js"
@@ -32,22 +32,21 @@
32
32
  "commander": "8.3.0",
33
33
  "css-loader": "6.5.1",
34
34
  "css-minimizer-webpack-plugin": "3.4.1",
35
- "esbuild": "0.14.11",
35
+ "esbuild": "0.14.13",
36
36
  "escape-string-regexp": "4.0.0",
37
37
  "fast-glob": "3.2.10",
38
38
  "find-free-ports": "3.0.0",
39
39
  "html-webpack-plugin": "5.5.0",
40
- "mini-css-extract-plugin": "2.5.2",
40
+ "mini-css-extract-plugin": "2.5.3",
41
41
  "postcss": "8.4.5",
42
42
  "postcss-loader": "6.2.1",
43
43
  "process": "0.11.10",
44
44
  "rimraf": "3.0.2",
45
45
  "sass": "1.49.0",
46
- "speed-measure-webpack-plugin": "1.5.0",
47
46
  "strip-ansi": "6.0.1",
48
47
  "style-loader": "3.3.1",
49
48
  "url": "0.11.0",
50
- "webpack": "5.66.0",
49
+ "webpack": "5.67.0",
51
50
  "webpack-dev-server": "4.7.3",
52
51
  "webpack-manifest-plugin": "4.1.1",
53
52
  "webpack-node-externals": "3.0.0"
@@ -22,7 +22,7 @@
22
22
 
23
23
  const stripAnsi = require('strip-ansi')
24
24
  const url = require('url')
25
- const formatWebpackMessages = require('./formatWebpackMessages')
25
+ const formatWebpackMessages = require('./formatWebpackMessages.js')
26
26
 
27
27
  // We need to keep track of if there has been a runtime error.
28
28
  // Essentially, we cannot guarantee application state was not corrupted by the
@@ -3,7 +3,6 @@
3
3
  const path = require('path')
4
4
  const webpack = require('webpack')
5
5
  const HtmlWebpackPlugin = require('html-webpack-plugin')
6
- const SpeedMeasurePlugin = require('speed-measure-webpack-plugin')
7
6
 
8
7
  const {
9
8
  envVars,
@@ -27,8 +26,6 @@ const {CI = false} = process.env
27
26
 
28
27
  process.env.NODE_ENV = 'development'
29
28
 
30
- const smp = new SpeedMeasurePlugin()
31
-
32
29
  /** @typedef {import('webpack').Configuration} WebpackConfig */
33
30
 
34
31
  /** @type {WebpackConfig} */
@@ -132,4 +129,4 @@ const webpackConfig = {
132
129
  config.sourcemaps && config.sourcemaps.dev ? config.sourcemaps.dev : false
133
130
  }
134
131
 
135
- module.exports = config.measure ? smp.wrap(webpackConfig) : webpackConfig
132
+ module.exports = webpackConfig
@@ -29,7 +29,6 @@ module.exports = {
29
29
  : MAIN_ENTRY_POINT,
30
30
  target: 'web',
31
31
  output: {
32
- jsonpFunction: 'suiWebpackJsonp',
33
32
  filename: 'index.js'
34
33
  },
35
34
  optimization: {
@@ -47,10 +46,5 @@ module.exports = {
47
46
  ]),
48
47
  module: {
49
48
  rules: [babelRules]
50
- },
51
- node: {
52
- fs: 'empty',
53
- net: 'empty',
54
- tls: 'empty'
55
49
  }
56
50
  }
@@ -8,7 +8,6 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
8
8
  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
- const SpeedMeasurePlugin = require('speed-measure-webpack-plugin')
12
11
 
13
12
  const {
14
13
  when,
@@ -36,8 +35,6 @@ const cssFileName = config.onlyHash
36
35
  ? '[contenthash:8].css'
37
36
  : '[name].[contenthash:8].css'
38
37
 
39
- const smp = new SpeedMeasurePlugin()
40
-
41
38
  /** @typedef {import('webpack').Configuration} WebpackConfig */
42
39
 
43
40
  /** @type {WebpackConfig} */
@@ -68,7 +65,10 @@ const webpackConfig = {
68
65
  minimizer: [minifyJs({extractComments, sourceMap}), minifyCss()].filter(
69
66
  Boolean
70
67
  ),
71
- runtimeChunk: true
68
+ runtimeChunk: true,
69
+ splitChunks: {
70
+ chunks: 'all'
71
+ }
72
72
  },
73
73
  plugins: cleanList([
74
74
  new webpack.ProvidePlugin({
@@ -137,4 +137,4 @@ const webpackConfig = {
137
137
  resolveLoader
138
138
  }
139
139
 
140
- module.exports = config.measure ? smp.wrap(webpackConfig) : webpackConfig
140
+ module.exports = webpackConfig