Skip to content

Commit

Permalink
fix: Don't compile .svelte/.../.xxx.js/ts files in Svelte 5
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Jun 6, 2024
1 parent 562db6a commit 8094d0d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# svelte-loader changelog

## 3.2.3

* Svelte 5: Don't compile `.svelte/.../.xxx.js/ts` files

## 3.2.2

* Svelte 5: Also compile `.svelte.xxx.js/ts` files
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function getMajor() {
return Number(svelte.VERSION.split('.')[0]);
}

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

Check failure on line 66 in index.js

View workflow job for this annotation

GitHub Actions / Test on Node v14 on ubuntu-latest

Missing semicolon

Check failure on line 66 in index.js

View workflow job for this annotation

GitHub Actions / Test on Node v16 on ubuntu-latest

Missing semicolon

Check failure on line 66 in index.js

View workflow job for this annotation

GitHub Actions / Test on Node v18 on ubuntu-latest

Missing semicolon

Check failure on line 66 in index.js

View workflow job for this annotation

GitHub Actions / Test on Node v14 on ubuntu-latest

Missing semicolon

Check failure on line 66 in index.js

View workflow job for this annotation

GitHub Actions / Test on Node v16 on ubuntu-latest

Missing semicolon

Check failure on line 66 in index.js

View workflow job for this annotation

GitHub Actions / Test on Node v18 on ubuntu-latest

Missing semicolon

module.exports = function(source, map) {
this.cacheable();
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-loader",
"version": "3.2.2",
"version": "3.2.3",
"author": "Nico Rehwaldt <[email protected]>",
"description": "A webpack loader for svelte",
"license": "MIT",
Expand Down

0 comments on commit 8094d0d

Please sign in to comment.