Skip to content

Commit

Permalink
convert Svelte example project to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jul 20, 2023
1 parent d6dc285 commit 500b107
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions e2e/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "svelte-app",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"start": "sirv public --no-clear",
"test": "jest src",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest src",
"test:watch": "npm run test -- --watch"
},
"devDependencies": {
Expand All @@ -32,12 +33,15 @@
"transform": {
"^.+\\.js$": "babel-jest",
"^.+\\.svelte$": [
"../../dist/transformer.cjs",
"../../dist/transformer.mjs",
{
"preprocess": true
}
]
},
"extensionsToTreatAsEsm": [
".svelte"
],
"moduleFileExtensions": [
"js",
"svelte"
Expand Down
4 changes: 2 additions & 2 deletions e2e/svelte/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const sveltePreprocess = require('svelte-preprocess')
import sveltePreprocess from 'svelte-preprocess';

module.exports = {
export default {
preprocess: sveltePreprocess({ sourceMap: true })
}

0 comments on commit 500b107

Please sign in to comment.