Skip to content

Commit

Permalink
fix: PDSymbol created by two different modules
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Nov 11, 2023
1 parent e323b4f commit 127d367
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/compiler/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import EsTreePlugin from "prettier/plugins/estree";
export class Compiler {
constructor(public input: QuasiOutput) {}

refinaModuleURL = "refina";
runtimeModuleURL = "@quasi-dev/runtime";

async compile() {
const code = `
import { app, view } from "${this.refinaModuleURL}";
import QuasiRuntime, * as $quasi from "${this.runtimeModuleURL}";
const { app, view } = $quasi.refina;
${this.input.views
.map((v) => {
const viewCompiler = new ViewCompiler(this, v);
Expand Down
2 changes: 0 additions & 2 deletions packages/northstar/src/views/preview.r.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/// <reference types="vite/client" />
import { HTMLElementComponent, ref, view } from "refina";

import refinaURL from "refina/src/index.ts?url";
import runtimeURL from "@quasi-dev/runtime/src/index.ts?url";
import iframeURL from "./iframe/index.html?url";
import mduiStyleContent from "@quasi-dev/runtime/styles.min.css?raw"; // Used in production
Expand All @@ -21,7 +20,6 @@ let errorMsg = "";

export async function startPreview() {
const compiler = new Compiler(toOutput());
compiler.refinaModuleURL = refinaURL;
compiler.runtimeModuleURL = runtimeURL;
code = await compiler.compile();
codeModified = true;
Expand Down
3 changes: 3 additions & 0 deletions packages/runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ export * from "./textNode.r";

import QuasiRuntime from "./plugin";
export default QuasiRuntime;

import * as refina from "refina";
export { refina };

0 comments on commit 127d367

Please sign in to comment.