Skip to content

Commit

Permalink
[업데이트] webpack 환경 구현
Browse files Browse the repository at this point in the history
choichoigang committed Mar 27, 2020

Verified

This commit was signed with the committer’s verified signature.
unfunco Daniel Morris
1 parent 8e6009e commit 7e0b435
Showing 7 changed files with 5,894 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
5,574 changes: 5,574 additions & 0 deletions frontend/package-lock.json

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "frontend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"babel-loader": "^8.1.0",
"css-loader": "^3.4.2",
"style-loader": "^1.1.3",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
}
}
4 changes: 2 additions & 2 deletions frontend/signUp.html
Original file line number Diff line number Diff line change
@@ -186,7 +186,7 @@ <h3 class="join_title"><label for="interest">관심사</label></h3>
</div>
</div>
</div>
<script src="./js/signUp.js" type="module"></script>
<script src="./js/signUp_ellin.js" type="module"></script>
<script src="/public/signup_bundle.js"></script>
<script src="/public/signUp_ellin_bundle.js"></script>
</body>
</html>
125 changes: 125 additions & 0 deletions public/signUp_ellin_bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

137 changes: 137 additions & 0 deletions public/signup_bundle.js

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const path = require("path");

module.exports = {
mode: "development",
entry: { signup: "./js/signUp.js", signUp_ellin: "./js/signUp_ellin.js" },
output: {
path: path.resolve(__dirname, "public"),
filename: "[name]_bundle.js"
},
module: {
rules: [
{ test: /\.css$/, use: ["style-loader", "css-loader"] },
{
test: /\.js$/,
include: path.resolve(__dirname, "src"),
use: {
loader: "babel-loader",
options: {
presets: [
[
"@babel/preset-env",
{
targets: {
browsers: ["last 2 versions"]
}
}
]
]
}
}
}
]
}
};

0 comments on commit 7e0b435

Please sign in to comment.