@s-ui/bundler 8.0.0-beta.7 → 8.0.0-beta.8
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-build.js +1 -4
- package/package.json +1 -1
package/bin/sui-bundler-build.js
CHANGED
|
@@ -6,7 +6,6 @@ const path = require('path')
|
|
|
6
6
|
const program = require('commander')
|
|
7
7
|
const rimraf = require('rimraf')
|
|
8
8
|
const webpack = require('webpack')
|
|
9
|
-
const {minify} = require('terser')
|
|
10
9
|
const {writeFile} = require('@s-ui/helpers/file')
|
|
11
10
|
|
|
12
11
|
const config = require('../webpack.config.prod')
|
|
@@ -76,7 +75,6 @@ webpack(nextConfig).run(async (error, stats) => {
|
|
|
76
75
|
if (stats.hasWarnings()) {
|
|
77
76
|
const jsonStats = stats.toJson('errors-warnings')
|
|
78
77
|
log.warn('Webpack generated the following warnings: ')
|
|
79
|
-
log.warn(jsonStats.warnings)
|
|
80
78
|
jsonStats.warnings.map(({message}) => log.warn(message))
|
|
81
79
|
}
|
|
82
80
|
|
|
@@ -137,10 +135,9 @@ webpack(nextConfig).run(async (error, stats) => {
|
|
|
137
135
|
JSON.stringify(staticsCacheOnly)
|
|
138
136
|
)
|
|
139
137
|
|
|
140
|
-
const {code: minifiedSw} = await minify(swCode, {sourceMap: false})
|
|
141
138
|
const swFilePath = resolvePublicFile('service-worker.js')
|
|
142
139
|
|
|
143
|
-
await writeFile(swFilePath,
|
|
140
|
+
await writeFile(swFilePath, swCode)
|
|
144
141
|
console.log('\nService worker generated succesfully!\n')
|
|
145
142
|
}
|
|
146
143
|
|