aurelia / webpack-plugin

A plugin for webpack that enables bundling Aurelia applications.
MIT License
90 stars 36 forks source link

modules not loading when using cache-loader #148

Open jauniuse opened 6 years ago

jauniuse commented 6 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior:

I want to use cache-loader in order to speed up webpack builds. As soon as I try to use cache-loader with ts-loader, during runtime modules defined with PLATFORM.ModuleName('XXX') cannot be resolved resulting in error Unable to find module with XXX.

Expected behavior: Modules defined with PLATFORM.ModuleName('XXX') should be resolved during runtime when using cache-loader and should not result in error.

expaso commented 6 years ago

Yes sir, me too. Building works fine, but problems arise when resolving modules at runtime.

jods4 commented 6 years ago

A tiny repro would help but my guess is that it's because we use symbols on dependencies and that cache loader serializes them to disk and back (and looses that information in the process).

If a repro confirms that changing the symbol to a string fixes this without unwanted effect we might consider the change.