Skip to content

Commit 4082b7a

Browse files
dependabot[bot]absiduePikachuEXE
authored
Bump the webpack group across 1 directory with 3 updates (#9378)
* Bump the webpack group across 1 directory with 3 updates Bumps the webpack group with 3 updates in the / directory: [webpack](https://github.com/webpack/webpack), [webpack-cli](https://github.com/webpack/webpack-cli) and [webpack-dev-server](https://github.com/webpack/webpack-dev-server). Updates `webpack` from 5.108.3 to 5.108.4 - [Release notes](https://github.com/webpack/webpack/releases) - [Changelog](https://github.com/webpack/webpack/blob/main/CHANGELOG.md) - [Commits](webpack/webpack@v5.108.3...v5.108.4) Updates `webpack-cli` from 7.1.0 to 7.2.1 - [Release notes](https://github.com/webpack/webpack-cli/releases) - [Changelog](https://github.com/webpack/webpack-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@7.1.0...webpack-cli@7.2.1) Updates `webpack-dev-server` from 5.2.5 to 6.0.0 - [Release notes](https://github.com/webpack/webpack-dev-server/releases) - [Changelog](https://github.com/webpack/webpack-dev-server/blob/main/CHANGELOG.md) - [Commits](webpack/webpack-dev-server@v5.2.5...v6.0.0) --- updated-dependencies: - dependency-name: webpack dependency-version: 5.108.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: webpack - dependency-name: webpack-cli dependency-version: 7.2.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: webpack - dependency-name: webpack-dev-server dependency-version: 6.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: webpack ... Signed-off-by: dependabot[bot] <support@github.com> * Update dev-runner script to support webpack-dev-server v6 * ! Fix dev won't start on macOS --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: absidue <48293849+absidue@users.noreply.github.com> Co-authored-by: PikachuEXE <git@pikachuexe.net>
1 parent f25ddd6 commit 4082b7a

3 files changed

Lines changed: 404 additions & 622 deletions

File tree

_scripts/dev-runner.js

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,6 @@ function startRenderer(callback) {
168168
const compiler = webpack(rendererConfig)
169169
const { name } = compiler
170170

171-
compiler.hooks.afterEmit.tap('afterEmit', () => {
172-
console.log(`\nCompiled ${name} script!`)
173-
console.log(`\nWatching file changes for ${name} script...`)
174-
})
175-
176171
const server = new WebpackDevServer({
177172
client: {
178173
overlay: {
@@ -185,7 +180,7 @@ function startRenderer(callback) {
185180
watch: {
186181
ignored: [
187182
/(dashFiles|storyboards)\/*/,
188-
'/**/.DS_Store',
183+
'**/.DS_Store',
189184
'**/static/locales/*'
190185
]
191186
},
@@ -201,45 +196,61 @@ function startRenderer(callback) {
201196
}
202197
],
203198
port
204-
}, compiler)
199+
})
200+
201+
server.apply(compiler)
205202

206-
server.startCallback(err => {
203+
setupNotifyLocaleUpdate(compiler, server)
204+
205+
let firstTime = true
206+
207+
compiler.watch({ aggregateTimeout: 250 }, (err, result) => {
207208
if (err) console.error(err)
208209

209-
setupNotifyLocaleUpdate(compiler, server)
210+
if (result) {
211+
console.log('\n' + result.toString({ colors: true }))
212+
}
213+
214+
console.log(`\nCompiled ${name} script!\n\nWatching file changes for ${name} script...`)
210215

211-
callback()
216+
if (firstTime) {
217+
firstTime = false
218+
callback()
219+
}
212220
})
213221
}
214222

215223
function startWeb () {
216224
const compiler = webpack(webConfig)
217225
const { name } = compiler
218226

219-
compiler.hooks.afterEmit.tap('afterEmit', () => {
220-
console.log(`\nCompiled ${name} script!`)
221-
console.log(`\nWatching file changes for ${name} script...`)
222-
})
223-
224227
const server = new WebpackDevServer({
225228
open: true,
226229
static: {
227230
directory: path.resolve(__dirname, '..', 'static'),
228231
watch: {
229232
ignored: [
230233
/(dashFiles|storyboards)\/*/,
231-
'/**/.DS_Store',
234+
'**/.DS_Store',
232235
'**/static/locales/*'
233236
]
234237
}
235238
},
236239
port
237-
}, compiler)
240+
})
241+
242+
server.apply(compiler)
243+
244+
setupNotifyLocaleUpdate(compiler, server)
238245

239-
server.startCallback(err => {
246+
compiler.watch({ aggregateTimeout: 250 }, (err, result) => {
240247
if (err) console.error(err)
241248

242-
setupNotifyLocaleUpdate(compiler, server)
249+
if (result) {
250+
console.log('\n' + result.toString({ colors: true }))
251+
}
252+
253+
console.log(`\nCompiled ${name} script!\n\nWatching file changes for ${name} script...`)
243254
})
244255
}
245256
if (!web) {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@
114114
"tree-kill": "1.2.2",
115115
"vue-eslint-parser": "^10.4.1",
116116
"vue-loader": "^17.4.2",
117-
"webpack": "^5.108.3",
118-
"webpack-cli": "^7.1.0",
119-
"webpack-dev-server": "^5.2.5"
117+
"webpack": "^5.108.4",
118+
"webpack-cli": "^7.2.1",
119+
"webpack-dev-server": "^6.0.0"
120120
}
121121
}

0 commit comments

Comments
 (0)