Flare-k

check babel

...@@ -116,4 +116,5 @@ dist ...@@ -116,4 +116,5 @@ dist
116 .pnp.* 116 .pnp.*
117 117
118 package-lock.json 118 package-lock.json
119 -uploads
...\ No newline at end of file ...\ No newline at end of file
119 +uploads
120 +static
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -14,9 +14,10 @@ const app = express(); ...@@ -14,9 +14,10 @@ const app = express();
14 app.use(helmet()); 14 app.use(helmet());
15 app.set("view engine", "pug"); 15 app.set("view engine", "pug");
16 app.use("/uploads", express.static("uploads")); 16 app.use("/uploads", express.static("uploads"));
17 +app.use("/static", express.static("static"));
17 app.use(cookieParser()); 18 app.use(cookieParser());
18 app.use(bodyParser.json()); 19 app.use(bodyParser.json());
19 -app.use(bodyParser.urlencoded({ extended: true })); //json, html, text, urlencoded 할 거 없이 다 parser할 수 있도록 설정해줘야 한다. 20 +app.use(bodyParser.urlencoded({ extended: true })); // json, html, text, urlencoded 할 거 없이 다 parser할 수 있도록 설정해줘야 한다.
20 app.use(morgan("dev")); 21 app.use(morgan("dev"));
21 22
22 app.use(localsMiddleware); 23 app.use(localsMiddleware);
...@@ -24,4 +25,4 @@ app.use(routes.home, globalRouter); ...@@ -24,4 +25,4 @@ app.use(routes.home, globalRouter);
24 app.use(routes.users, userRouter); 25 app.use(routes.users, userRouter);
25 app.use(routes.videos, videoRouter); 26 app.use(routes.videos, videoRouter);
26 27
27 -export default app; //파일을 불러올때 app object를 준다는 의미.
...\ No newline at end of file ...\ No newline at end of file
28 +export default app; // 파일을 불러올때 app object를 준다는 의미.
......
1 import "../scss/style.scss"; 1 import "../scss/style.scss";
2 +
3 +const something = async () => {
4 + console.log("something");
5 +};
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 "main": "app.js", 5 "main": "app.js",
6 "scripts": { 6 "scripts": {
7 "dev:server": "nodemon --exec babel-node init.js --delay 2", 7 "dev:server": "nodemon --exec babel-node init.js --delay 2",
8 - "dev:assets": "WEBPACK_ENV=development webpack", 8 + "dev:assets": "WEBPACK_ENV=development webpack -w",
9 "build:assets": "WEBPACK_ENV=production webpack" 9 "build:assets": "WEBPACK_ENV=production webpack"
10 }, 10 },
11 "repository": { 11 "repository": {
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
17 "dependencies": { 17 "dependencies": {
18 "@babel/core": "^7.9.6", 18 "@babel/core": "^7.9.6",
19 "@babel/node": "^7.8.7", 19 "@babel/node": "^7.8.7",
20 + "@babel/polyfill": "^7.10.1",
20 "@babel/preset-env": "^7.9.6", 21 "@babel/preset-env": "^7.9.6",
21 "autoprefixer": "^9.8.0", 22 "autoprefixer": "^9.8.0",
23 + "babel-loader": "^8.1.0",
22 "body-parser": "^1.19.0", 24 "body-parser": "^1.19.0",
23 "cookie-parser": "^1.4.5", 25 "cookie-parser": "^1.4.5",
24 "css-loader": "^3.5.3", 26 "css-loader": "^3.5.3",
......
This diff could not be displayed because it is too large.
...@@ -5,8 +5,10 @@ html ...@@ -5,8 +5,10 @@ html
5 head 5 head
6 <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous"> 6 <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
7 title #{pageTitle} | #{siteName} 7 title #{pageTitle} | #{siteName}
8 + link(rel="stylesheet", href="/static/style.css")
8 body 9 body
9 include ../partials/header 10 include ../partials/header
10 main 11 main
11 block content 12 block content
12 include ../partials/footer 13 include ../partials/footer
14 + script(src="/static/main.js")
......
...@@ -7,7 +7,7 @@ const ENTRY_FILE = path.resolve(__dirname, "assets", "js", "main.js"); ...@@ -7,7 +7,7 @@ const ENTRY_FILE = path.resolve(__dirname, "assets", "js", "main.js");
7 const OUTPUT_DIR = path.join(__dirname, "static"); 7 const OUTPUT_DIR = path.join(__dirname, "static");
8 8
9 const config = { 9 const config = {
10 - entry: [ENTRY_FILE], 10 + entry: ["@babel/polyfill", ENTRY_FILE],
11 mode: MODE, 11 mode: MODE,
12 module: { 12 module: {
13 rules: [ 13 rules: [
......