Skip to content

Commit

Permalink
fix: svelte-package import from "./" workarond
Browse files Browse the repository at this point in the history
Fixed #39
  • Loading branch information
bfanger committed Jun 22, 2024
1 parent 869e20c commit 04e7b54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type": "git",
"url": "https://github.com/bfanger/svelte-preprocess-react.git"
},
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.5",
"license": "MIT",
"type": "module",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/preprocessReact.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ function transform(content, options) {
const prefix = "React$$";
/** @type {string} */
let portal;
const packageName = "svelte-preprocess-react";
const imports = [
`import { sveltify as ${prefix}sveltify } from "svelte-preprocess-react";`,
`import { sveltify as ${prefix}sveltify } from "${packageName}";`,
];

if (options.react >= 18) {
Expand Down

0 comments on commit 04e7b54

Please sign in to comment.