Skip to content

Commit

Permalink
fix(build/jotai): Fix wrong wrp-jotai import (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyp3rflow authored Aug 18, 2022
1 parent 2b04c20 commit 337276f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/build-npm-packages/buildWrpJotai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export default async function buildWrpJotai(config: BuildConfig) {
await Deno.writeTextFile(
toPath,
rewriteModulePath(code, (modulePath) => {
if (modulePath.startsWith("../")) {
if (modulePath.startsWith("../react/")) {
return removeExt(
modulePath.replace(/^\.\.\/react\//, "@pbkit/wrp-react/"),
);
} else if (modulePath.startsWith("../")) {
return removeExt(modulePath.replace(/^\.\.\//, "@pbkit/wrp/"));
} else if (modulePath.startsWith(".")) {
return removeExt(modulePath);
Expand Down

0 comments on commit 337276f

Please sign in to comment.