diff --git a/test/versionTests/entry5.js b/test/versionTests/entry5.js new file mode 100644 index 0000000..470d57b --- /dev/null +++ b/test/versionTests/entry5.js @@ -0,0 +1,6 @@ +import { mount } from "svelte"; +import Test from "./index.svelte"; + +mount(Test, { + target: document.body, +}); \ No newline at end of file diff --git a/test/versionTests/test.js b/test/versionTests/test.js index 0c7e0e9..2a5d4b3 100644 --- a/test/versionTests/test.js +++ b/test/versionTests/test.js @@ -13,7 +13,7 @@ if (!fs.existsSync("./dist/")) { //build the application esbuild .build({ - entryPoints: ["./entry.js"], + entryPoints: [Number(svelteVersion.at(0)) >= 5 ? "./entry5.js" : "./entry.js"], mainFields: ["svelte", "browser", "module", "main"], conditions: ["svelte", "browser"], target: "es2016", @@ -23,7 +23,7 @@ esbuild minify: false, //so the resulting code is easier to understand bundle: true, splitting: true, - sourcemap: "inline", + sourcemap: "external", plugins: [sveltePlugin()], }) .then((results) => { diff --git a/test/versionTests/versionTests.sh b/test/versionTests/versionTests.sh index f0fb465..bae7fd1 100755 --- a/test/versionTests/versionTests.sh +++ b/test/versionTests/versionTests.sh @@ -11,7 +11,7 @@ cp ../../dist/index.js . npm init -y || exit # array of versions -ESBUILD_VERSIONS=("0.9.6" "0.16.17" "0.18.10" "0.19.2") +ESBUILD_VERSIONS=("0.9.6" "0.16.17" "0.18.10" "0.19.2" "0.21.3") SVELTE_VERSIONS=("3.43.0" "3.59.2" "4.0.0" "5.0.0-next.127") # loop through versions