Skip to content

Commit

Permalink
docs: update test patterns
Browse files Browse the repository at this point in the history
For Svelte 5 .svelte.js and .svelte.ts files need to be checked, too
  • Loading branch information
dummdidumm committed Jun 4, 2024
1 parent 1a5e3e4 commit c5ecc7b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,18 @@ Configure inside your `webpack.config.js`:
module: {
rules: [
...
// This is only needed if you use Svelte 5+ with TypeScript
{
test: /\.(html|svelte)$/,
test: /\.svelte\.ts$/,
use: ['ts-loader', 'svelte-loader']
},
{
// Svelte 5+:
test: /\.(svelte|svelte\.js)$/,
// Svelte 3 or 4:
// test: /\.svelte$/,
// In case you write Svelte in HTML (not recommended since Svelte 3):
// test: /\.(html|svelte)$/,
use: 'svelte-loader'
},
{
Expand Down Expand Up @@ -76,7 +86,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
rules: [
...
{
test: /\.(html|svelte)$/,
test: /\.(svelte|svelte\.js)$/,
use: {
loader: 'svelte-loader',
options: {
Expand Down Expand Up @@ -219,7 +229,7 @@ module.exports = {
rules: [
...
{
test: /\.(html|svelte)$/,
test: /\.(svelte|svelte\.js)$/,
use: {
loader: 'svelte-loader',
options: {
Expand Down Expand Up @@ -311,7 +321,7 @@ module.exports = {
rules: [
...
{
test: /\.(html|svelte)$/,
test: /\.(svelte|svelte\.js)$/,
use: {
loader: 'svelte-loader',
options: {
Expand Down

0 comments on commit c5ecc7b

Please sign in to comment.