Skip to content

Commit 8094d0d

Browse files
committed
fix: Don't compile .svelte/.../.xxx.js/ts files in Svelte 5
1 parent 562db6a commit 8094d0d

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# svelte-loader changelog
22

3+
## 3.2.3
4+
5+
* Svelte 5: Don't compile `.svelte/.../.xxx.js/ts` files
6+
37
## 3.2.2
48

59
* Svelte 5: Also compile `.svelte.xxx.js/ts` files

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function getMajor() {
6363
return Number(svelte.VERSION.split('.')[0]);
6464
}
6565

66-
const svelte_module_regex = /\.svelte(\.[^.]+)*\.(js|ts)$/
66+
const svelte_module_regex = /\.svelte(\.[^./\\]+)*\.(js|ts)$/
6767

6868
module.exports = function(source, map) {
6969
this.cacheable();

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-loader",
3-
"version": "3.2.2",
3+
"version": "3.2.3",
44
"author": "Nico Rehwaldt <[email protected]>",
55
"description": "A webpack loader for svelte",
66
"license": "MIT",

0 commit comments

Comments
 (0)