Skip to content

Commit

Permalink
chore: 메타설정 (favicon, title 등)
Browse files Browse the repository at this point in the history
  • Loading branch information
milk717 committed Nov 16, 2023
1 parent c769a8c commit 4e7eb5d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion FE/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fe-boilerplate",
"name": "gomterview",
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand Down
Binary file added FE/public/favicon.ico
Binary file not shown.
21 changes: 11 additions & 10 deletions FE/public/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!doctype html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FE boilerplate</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
<html lang='ko'>
<head>
<meta charset='UTF-8' />
<link href='./favicon.ico' rel='icon'>
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<title>곰터뷰</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id='root'></div>
</body>
</html>
31 changes: 18 additions & 13 deletions FE/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,21 @@ if (process.env.REACT_APP_GTAG_ID) {
ReactGA.initialize(process.env.REACT_APP_GTAG_ID);
}

deferRender()
.then(() => {
const rootElement = document.getElementById('root');
if (rootElement) {
const root = ReactDOM.createRoot(rootElement);
root.render(<App />);
} else {
console.error('Root element not found');
}
})
.catch((err) => {
console.error('Failed to start mock service worker', err);
});
const rootElement = document.getElementById('root');

const root = ReactDOM.createRoot(rootElement!);
root.render(<App />);

// deferRender()
// .then(() => {
// const rootElement = document.getElementById('root');
// if (rootElement) {
// const root = ReactDOM.createRoot(rootElement);
// root.render(<App />);
// } else {
// console.error('Root element not found');
// }
// })
// .catch((err) => {
// console.error('Failed to start mock service worker', err);
// });
1 change: 1 addition & 0 deletions FE/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module.exports = {
new HtmlWebpackPlugin({
template: './public/index.html',
filename: 'index.html',
favicon: './public/favicon.ico',
}),
new webpack.HotModuleReplacementPlugin(),
new CopyPlugin({
Expand Down

0 comments on commit 4e7eb5d

Please sign in to comment.