Skip to content

Commit

Permalink
fix plugin when cache not set
Browse files Browse the repository at this point in the history
  • Loading branch information
elitastic committed May 6, 2022
1 parent 906e25a commit bc14049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PreserveModuleNamePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class PreserveModuleNamePlugin {
// Override NormalModule serializer: "preserveModuleName" should be serialized
// to ensure correct module serialization of conventional dependencies (ConventionDependenciesPlugin)
// when "webpack filesystem cache" is enabled, https://github.com/aurelia/webpack-plugin/issues/199
const isFilesystemCacheEnabled = typeof (compiler.options.cache) != 'boolean' && compiler.options.cache.type == 'filesystem';
const isFilesystemCacheEnabled = typeof (compiler.options.cache) == 'object' && compiler.options.cache.type == 'filesystem';
if (isFilesystemCacheEnabled) {
overrideNormalModuleSerializer();
}
Expand Down

0 comments on commit bc14049

Please sign in to comment.