diff --git a/javascript-modules/engines/svelte-engine/lib/builder.js b/javascript-modules/engines/svelte-engine/lib/builder.js index f4ec6505..e6e53201 100644 --- a/javascript-modules/engines/svelte-engine/lib/builder.js +++ b/javascript-modules/engines/svelte-engine/lib/builder.js @@ -1,11 +1,9 @@ import sveltePlugin from "esbuild-svelte"; -import svelteFixPlugin from "./svelteFixPlugin.js"; export const extensions = [".svelte"]; export const buildPlugins = [ - sveltePlugin({ compileOptions: { css: true } }), - svelteFixPlugin + sveltePlugin({ compileOptions: { css: true } }) ] export const esbuildConfigFn = (esbuildOptions, options) => { diff --git a/javascript-modules/engines/svelte-engine/lib/svelteFixPlugin.js b/javascript-modules/engines/svelte-engine/lib/svelteFixPlugin.js deleted file mode 100644 index 070fefe4..00000000 --- a/javascript-modules/engines/svelte-engine/lib/svelteFixPlugin.js +++ /dev/null @@ -1,16 +0,0 @@ -import path from 'path'; -import { createRequire } from 'module'; - -export default { - name: 'fix_svelte_path', - setup(b) { - const require = createRequire(import.meta.url); - const svelteFileLocation = require.resolve('svelte'); - const svelteFolderLocation = path.dirname(svelteFileLocation); - const nodeFolderLocation = path.dirname(svelteFolderLocation); - - b.onResolve({ filter: /^svelte$|^svelte\// }, args => { - return { path: path.join(nodeFolderLocation,args.path,'index.mjs') } - }); - } -} \ No newline at end of file