Skip to content

Commit 5c1ee5a

Browse files
committed
fix: handle emitcss to css option transformation
option is different in Svelte 4
1 parent 064aca2 commit 5c1ee5a

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# svelte-loader changelog
22

3+
## 3.1.9
4+
5+
* Handle `emitCSS` to `css` option transformation correctly for Svelte 4
6+
37
## 3.1.8
48

59
* Get ready for Svelte 4

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module.exports = function(source, map) {
7373

7474
const compileOptions = {
7575
filename: this.resourcePath,
76-
css: !options.emitCss,
76+
css: VERSION[0] === '3' ? !options.emitCss : (options.emitCss ? 'external' : 'injected'),
7777
...options.compilerOptions
7878
};
7979
if (VERSION[0] === '3') {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-loader",
3-
"version": "3.1.8",
3+
"version": "3.1.9",
44
"author": "Nico Rehwaldt <git_nikku@nixis.de>",
55
"description": "A webpack loader for svelte",
66
"license": "MIT",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy