typhonjs-fvtt-demo / template-svelte-esm

Provides a basic Foundry module template w/ TRL and ES modules to generate your own module.
Other
4 stars 2 forks source link

[BUG] s_SVELTE_HASH_ID is no longer necessary as vite-plugin-svelte overrides cssHash #3

Open ElSaico opened 8 months ago

ElSaico commented 8 months ago

Describe the bug The version of vite-plugin-svelte used by TRL (2.4.3) emits the following message:

19:44:23 [vite-plugin-svelte] The following Svelte compilerOptions are controlled by vite-plugin-svelte and essential to its functionality. User-specified values are ignored. Please remove them from your configuration: cssHash

Since s_SVELTE_HASH_ID is used to compose cssHash, it should not be needed anymore.

To Reproduce Steps to reproduce the behavior:

  1. Run npm run dev
  2. Watch the console output
typhonrt commented 8 months ago

There are various dependency updates that will be handled with the TRL 0.2.0 release and resulting updates to the demo repos. vite-plugin-svelte has various new warnings and such and so does Svelte for certain things like new a11y warnings to fix up. So indeed things will be on the up and up soon.

The reason in the past for setting a semi-unique CSS hash is Foundry specific. If you have several packages enabled that are TRL related depending on the circumstance that can make looking / finding the specific CSS blocks in browser developer tools more difficult. The unique CSS hash ID in the past allowed some uniqueness in the hash Svelte uses and this helped disambiguate multiple TRL packages.