sveltejs / rollup-plugin-svelte

Compile Svelte components with Rollup
MIT License
505 stars 79 forks source link

feat: set compilerOptions.css to 'external' when emitCss was true #211

Closed gucheen closed 1 year ago

gucheen commented 1 year ago

to remove below warning

compilerOptions.css as a boolean is deprecated. Use 'external' instead of false.

set css to 'external' while svelte version >= 4

latest svelte compiler has changed css option values to

css?: 'injected' | 'external' | 'none' | boolean;
gucheen commented 1 year ago

Thank you! I think it's easier to simplify this to just check for version 3 since it's backwards compatible in that. Makes the code a bit easier to reason about. Could you adjust the code accordingly? Then we're good to merge 👍

I have adjust the version checking to majorVer > 3(start from svelte v4) @dummdidumm