-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds frontend setup with melange and webpack
- Loading branch information
1 parent
5f349de
commit 22ebb78
Showing
8 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules | ||
_esy | ||
*~ | ||
*~ | ||
static | ||
_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
switch (ReactDOM.querySelector("#root")) { | ||
| Some(el) => ignore @@ ReactDOM.Client.hydrateRoot(el, <Reason_india_website_js.App />) | ||
| None => () | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(melange.emit | ||
(alias client) | ||
(target app) | ||
(libraries melange reason_india_website_js reason-react) | ||
(preprocess | ||
(pps reason-react-ppx melange.ppx)) | ||
(module_systems commonjs)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(data_only_dirs node_modules esy.lock _esy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
(lang dune 3.15) | ||
|
||
(name reason_india_website) | ||
(using melange 0.1) | ||
|
||
(generate_opam_files true) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(library | ||
(name reason_india_website_js) | ||
(modes melange) | ||
(libraries melange reason-react) | ||
(preprocess | ||
(pps melange.ppx reason-react-ppx))) | ||
|
||
(copy_files# "../native/*.re") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const Path = require("path"); | ||
|
||
let buildFolder = Path.join(__dirname, "_build/default/client"); | ||
|
||
module.exports = (env) => ({ | ||
devtool: env.production ? false : "inline-cheap-module-source-map", | ||
entry: { | ||
app: Path.join(buildFolder, "/app/client/app.js"), | ||
}, | ||
mode: 'development', | ||
output: { | ||
path: Path.join(__dirname, "static"), | ||
filename: "[name].js", | ||
}, | ||
}); |