Skip to content

Commit ab99ced

Browse files
committed
Never cleanup dist/hot during development
1 parent 0071b32 commit ab99ced

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

programs/develop/webpack/plugin-css/css-in-content-script-loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function cssInContentScriptLoader(
99
) {
1010
const manifestPath = path.join(projectPath, 'manifest.json')
1111

12-
return {
12+
return [{
1313
test: /\.css$/,
1414
type: 'asset',
1515
generator: {
@@ -21,5 +21,5 @@ export async function cssInContentScriptLoader(
2121
use: await commonStyleLoaders(projectPath, {
2222
mode: mode as 'development' | 'production'
2323
})
24-
}
24+
}]
2525
}

programs/develop/webpack/webpack-config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ export default function webpackConfig(
5050

5151
const cleanConfig = devOptions.output?.clean
5252
? devOptions.output.clean
53-
: {
54-
keep: devOptions.mode === 'development' ? 'hot' : undefined
55-
}
53+
// Keep hot updates for content scripts in development mode
54+
: devOptions.mode === 'development'
5655

5756
return {
5857
mode: devOptions.mode || 'development',

0 commit comments

Comments
 (0)