Skip to content

Commit

Permalink
feat: 🎸 Depply merge watch options defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimck committed Feb 2, 2022
1 parent 82df2fc commit bd8d07a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/cli/src/webpack/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,20 @@ async function resolveImaConfigWithDefaults(args: CliArgs): Promise<ImaConfig> {
imageInlineSizeLimit: 8192,
watchOptions: {
ignored: ['**/.git/**', '**/node_modules/**', '**/build/**'],
followSymlinks: true,
aggregateTimeout: 5,
},
};

const imaConfig = requireImaConfig(args.rootDir);

return {
...defaultImaConfig,
...requireImaConfig(args.rootDir),
...imaConfig,
watchOptions: {
...defaultImaConfig.watchOptions,
...imaConfig?.watchOptions,
},
};
}

Expand Down

0 comments on commit bd8d07a

Please sign in to comment.