Serve react and react-dom without cdn
This commit is contained in:
+8
-12
@@ -1,15 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Aalto-yliopiston Sähköinsinoorikilta ry</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
<!-- Dependencies -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.2.0/umd/react.production.min.js" integrity="sha256-wouRkivKKXA3y6AuyFwcDcF50alCNV8LbghfYCH6Z98=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.2.0/umd/react-dom.production.min.js" integrity="sha256-9hrJxD4IQsWHdNpzLkJKYGiY/SEZFJJSUqyeZPNKd8g=" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Aalto-yliopiston Sähköinsinoorikilta ry</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+13
-13
@@ -8,24 +8,24 @@ import "./index.scss";
|
||||
const rootEl = document.getElementById("root");
|
||||
|
||||
render(
|
||||
<AppContainer>
|
||||
<App/>
|
||||
</AppContainer>,
|
||||
rootEl
|
||||
<AppContainer>
|
||||
<App/>
|
||||
</AppContainer>,
|
||||
rootEl
|
||||
);
|
||||
|
||||
// Hot Module Replacement API
|
||||
declare const module: { hot: any };
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept("./components/App", () => {
|
||||
const NewApp = require("./components/App").default;
|
||||
module.hot.accept("./components/App", () => {
|
||||
const NewApp = require("./components/App").default;
|
||||
|
||||
render(
|
||||
<AppContainer>
|
||||
<NewApp/>
|
||||
</AppContainer>,
|
||||
rootEl
|
||||
);
|
||||
});
|
||||
render(
|
||||
<AppContainer>
|
||||
<NewApp/>
|
||||
</AppContainer>,
|
||||
rootEl
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user