File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export async function buildInternal(
39
39
40
40
const entrypoints = await findEntrypoints ( config ) ;
41
41
const groups = groupEntrypoints ( entrypoints ) ;
42
- const { output } = await rebuild ( config , groups ) ;
42
+ const { output } = await rebuild ( config , groups , undefined , true ) ;
43
43
44
44
// Post-build
45
45
config . logger . success (
@@ -70,7 +70,11 @@ export async function rebuild(
70
70
) : Promise < { output : BuildOutput ; manifest : Manifest . WebExtensionManifest } > {
71
71
// Update types directory with new files and types
72
72
const allEntrypoints = await findEntrypoints ( config ) ;
73
- await generateTypesDir ( allEntrypoints , config ) ;
73
+ await generateTypesDir ( allEntrypoints , config ) . catch ( ( err ) => {
74
+ config . logger . warn ( 'Failed to update .wxt directory:' , err ) ;
75
+ // Throw the error if doing a regular build, don't for dev mode.
76
+ if ( config . command === 'build' ) throw err ;
77
+ } ) ;
74
78
75
79
// Build and merge the outputs
76
80
const newOutput = await buildEntrypoints ( entrypointGroups , config ) ;
Original file line number Diff line number Diff line change @@ -59,8 +59,9 @@ export async function createServer(
59
59
60
60
await fileChangedMutex . runExclusive ( async ( ) => {
61
61
const fileChanges = changeQueue . splice ( 0 , changeQueue . length ) ;
62
- const changes = detectDevChanges ( fileChanges , server . currentOutput ) ;
62
+ if ( fileChanges . length === 0 ) return ;
63
63
64
+ const changes = detectDevChanges ( fileChanges , server . currentOutput ) ;
64
65
if ( changes . type === 'no-change' ) return ;
65
66
66
67
// Log the entrypoints that were effected
You can’t perform that action at this time.
0 commit comments