Skip to content

Commit

Permalink
fix: Fix file references (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg authored Feb 23, 2023
1 parent 647f098 commit 38bb023
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/heightBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import { getJSPageHeight, getWatPageHeight } from "./processor.js";

const config = getConfig();

const rootDir = new URL("..", import.meta.url);

function getEditorHeights() {
return fse.readJsonSync(config.editorHeights);
return fse.readJsonSync(new URL(config.editorHeights, rootDir));
}

/**
Expand Down
18 changes: 13 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,30 @@ export default {
],
entry: {
"editor-tabbed": {
import: "./editor/js/editor.js",
import: fileURLToPath(new URL("./editor/js/editor.js", import.meta.url)),
dependOn: "codemirror",
},
"editor-css": {
import: "./editor/js/editable-css.js",
import: fileURLToPath(
new URL("./editor/js/editable-css.js", import.meta.url)
),
dependOn: "codemirror",
},
"editor-js": {
import: "./editor/js/editable-js.js",
import: fileURLToPath(
new URL("./editor/js/editable-js.js", import.meta.url)
),
dependOn: "codemirror",
},
"editor-wat": {
import: "./editor/js/editable-wat.js",
import: fileURLToPath(
new URL("./editor/js/editable-wat.js", import.meta.url)
),
dependOn: "codemirror",
},
codemirror: "./editor/js/editor-libs/codemirror-editor.js",
codemirror: fileURLToPath(
new URL("./editor/js/editor-libs/codemirror-editor.js", import.meta.url)
),
},
output: {
path: fileURLToPath(new URL("docs", import.meta.url)),
Expand Down

0 comments on commit 38bb023

Please sign in to comment.