Skip to content

Commit c27c7c9

Browse files
cyrilletuzihansl
authored andcommitted
fix(@angular/cli): ignore system files in assets
Replaces angular/devkit#263 When copying the assets during build, the CLI must not include system files (e.g. `.DS_Store` and `Thumbs.db`). It is very important for service worker to work : if presents, these files will be included in the service worker manifest as files to cache. But such files may (and should) not be deployed to the server. Then on the client, files will be missing, then the service worker installation will fail and so all the offline feature won't work.
1 parent 7738112 commit c27c7c9

File tree

1 file changed

+1
-1
lines changed
  • packages/@angular/cli/models/webpack-configs

1 file changed

+1
-1
lines changed

packages/@angular/cli/models/webpack-configs/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
137137
}
138138
};
139139
});
140-
const copyWebpackPluginOptions = { ignore: ['.gitkeep'] };
140+
const copyWebpackPluginOptions = { ignore: ['.gitkeep', '**/.DS_Store', '**/Thumbs.db'] };
141141

142142
const copyWebpackPluginInstance = new CopyWebpackPlugin(copyWebpackPluginPatterns,
143143
copyWebpackPluginOptions);

0 commit comments

Comments
 (0)