Skip to content

Commit

Permalink
fix: full path for monaco js and ts language worker
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesx00 committed Dec 22, 2024
1 parent 0bd679b commit 5bfe6f8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion _data/env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
require("dotenv").config();

module.exports = process.env;
module.exports = {
...process.env,
base_url:
process.env.DEVELOPMENT === "true"
? "http://localhost:8080"
: "https://www.pythonexpert.dev",
};
2 changes: 1 addition & 1 deletion _includes/layouts/lesson.njk
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ layout: layouts/base.njk
<script>
require.config({
paths: {
vs: "/js/monaco-editor/min/vs"
vs: "{{env.base_url}}/js/monaco-editor/min/vs"
}
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/diff-editor.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: Diff editor
<script>
require.config({
paths: {
vs: "/js/monaco-editor/min/vs"
vs: "{{ env.base_url }}/js/monaco-editor/min/vs"
}
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/markdown-editor.njk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ title: Live editor
<script>
require.config({
paths: {
vs: "/js/monaco-editor/min/vs"
vs: "{{ env.base_url }}/js/monaco-editor/min/vs"
}
});
</script>
Expand Down

0 comments on commit 5bfe6f8

Please sign in to comment.