Description
Our webpacker config appears to be loading all of our test files and helpers for production builds. I need to exclude any files that end with .spec.ts
now because since upgrading to rails 5.2.1 dev dependencies are no longer installed, which breaks the build since the spec files are looking for dev dependencies which aren't there. I do need to include any that end with just .ts
, though (which are in the same directories as the ones with spec.ts
, per angular community guidelines).
I see that webpacker automatically globs directories passed to resolved_paths
, so I can't specify my own path there (i.e. the path I really want is app/assets/angular/**/*[^spec].ts
, not just app/assets/angular/**/*
). I also tried adding [^spec].ts
to the extensions list, hoping webpacker would generate a path like app/assets/angular/**/*[^spec].ts
, but it does not.
How do I tell webpacker to load only .ts
files in app/assets/angular
that do not end with spec.ts
?