Flare-k

check babel

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