Skip to content

Commit 4a5fa73

Browse files
committed
fix: mark fsevents as external
1 parent fa4c5b7 commit 4a5fa73

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

rollup.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const nodePlugins = [
7979
export default (command: Record<string, unknown>): RollupOptions | RollupOptions[] => {
8080
const { collectLicenses, writeLicense } = getLicenseHandler();
8181
const commonJSBuild: RollupOptions = {
82+
external: ['fsevents'],
8283
input: {
8384
'loadConfigFile.js': 'cli/run/loadConfigFile.ts',
8485
'rollup.js': 'src/node-entry.ts'

src/watch/fsevents-importer.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ let fsEvents: unknown;
22
let fsEventsImportError: Error | undefined;
33

44
export async function loadFsEvents(): Promise<void> {
5-
const moduleName = 'fsevents';
6-
75
try {
8-
({ default: fsEvents } = await import(moduleName));
6+
({ default: fsEvents } = await import('fsevents'));
97
} catch (err: any) {
108
fsEventsImportError = err;
119
}

0 commit comments

Comments
 (0)