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(
3939
4040 const entrypoints = await findEntrypoints ( config ) ;
4141 const groups = groupEntrypoints ( entrypoints ) ;
42- const { output } = await rebuild ( config , groups ) ;
42+ const { output } = await rebuild ( config , groups , undefined , true ) ;
4343
4444 // Post-build
4545 config . logger . success (
@@ -70,7 +70,11 @@ export async function rebuild(
7070) : Promise < { output : BuildOutput ; manifest : Manifest . WebExtensionManifest } > {
7171 // Update types directory with new files and types
7272 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+ } ) ;
7478
7579 // Build and merge the outputs
7680 const newOutput = await buildEntrypoints ( entrypointGroups , config ) ;
Original file line number Diff line number Diff line change @@ -59,8 +59,9 @@ export async function createServer(
5959
6060 await fileChangedMutex . runExclusive ( async ( ) => {
6161 const fileChanges = changeQueue . splice ( 0 , changeQueue . length ) ;
62- const changes = detectDevChanges ( fileChanges , server . currentOutput ) ;
62+ if ( fileChanges . length === 0 ) return ;
6363
64+ const changes = detectDevChanges ( fileChanges , server . currentOutput ) ;
6465 if ( changes . type === 'no-change' ) return ;
6566
6667 // Log the entrypoints that were effected
You can’t perform that action at this time.
0 commit comments