Skip to content

Commit

Permalink
fix: replace esbuild with webpack to ensure require works on runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Feb 10, 2022
1 parent 804b0ef commit 43c0654
Show file tree
Hide file tree
Showing 9 changed files with 39,917 additions and 9,557 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ _coverage
*.coverage
coverage.json

# BuckleScript artifacts
*.bs.js
# Website artifacts
website/build
30 changes: 0 additions & 30 deletions package.json

This file was deleted.

2 changes: 1 addition & 1 deletion website/Monaco.re
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ external make:
~options: options
) =>
React.element =
{|require("@monaco-editor/react")|};
{|require("@monaco-editor/react").Editor|};
18 changes: 11 additions & 7 deletions website/dune
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
(executable
(name Website)
(modes js)
(libraries
console.lib
query-json-js
yojson
js_of_ocaml
jsoo-react.lib
jsoo-css)
(libraries query-json-js js_of_ocaml jsoo-react.lib jsoo-css)
(preprocess
(pps jsoo-react.ppx ppx_jsobject_conv)))

; @monaco-editor/react uses `rollupjs` to build
; which creates a folder with underscore `_virtual`
; dune by default ignores any prefixed with underscore folder.
; This hardcodes the path dune ignores.
; If we update the lib, this might break

(dirs
node_modules/@monaco-editor/react/lib/cjs/_virtual
node_modules/@monaco-editor/loader/lib/cjs/_virtual)
1 change: 0 additions & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,5 @@
</head>
<body>
<div id="root"></div>
<script src="./js/bundle.js"></script>
</body>
</html>
Loading

0 comments on commit 43c0654

Please sign in to comment.