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
const path = require("path"); | |
module.exports = function override(config, env) { | |
const babelRule = config.module.rules[1].oneOf.find( | |
(rules) => rules.include === path.resolve(__dirname, "./src") | |
); | |
babelRule.include = [ | |
babelRule.include, | |
path.resolve(__dirname, "../typescript/src") | |
]; |
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
{ | |
... | |
"scripts": { | |
"start": "PORT=3001 react-app-rewired start", | |
}, | |
} |
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
{ | |
"scripts": { | |
"start": "react-app-rewired start" | |
} | |
} |
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
const express = require("express"); | |
const fs = require("fs"); | |
const path = require("path"); | |
const app = express(); | |
const port = process.env.PORT || 8080; | |
const filePath = path.resolve(__dirname, "./build", "index.html"); | |
// Home page route | |
app.get("/", function (request, response) { | |
// Read in index.html |
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
< !DOCTYPE html > | |
<html> | |
<head> | |
<!-- web crawlers will read this --> | |
<meta name="og:title" property="og:title" content="<%= title %>" /> | |
<script> | |
// browser windows will activate this | |
window.location.href = "<%= redirectUrl %>"; | |
</script> | |
</head> |