Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix file references #1116

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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