Skip to content
Snippets Groups Projects
Commit 212ff5c0 authored by JYCHOI's avatar JYCHOI
Browse files

match versions

parent 4cdec9d5
No related branches found
No related tags found
1 merge request!1Main
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}
\ No newline at end of file
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
package-lock.json
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
...@@ -18,9 +18,11 @@ ...@@ -18,9 +18,11 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"webpack": "^5.73.0", "webpack": "^5.73.0",
"webpack-cli": "^4.10.0" "webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.13.2"
}, },
"scripts": { "scripts": {
"start": "webpack-dev-server --open --mode development --port 3000",
"build": "webpack --mode development", "build": "webpack --mode development",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
<head> <head>
<title> muiBasic </title> <title> muiBasic </title>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script src="./bundle.js" type="text/javascript"></script> <script src="./app.bundle.js" type="text/javascript"></script>
</body> </body>
</html> </html>
const path = require('path'); const path = require('path');
const webpack = require('webpack');
module.exports = { module.exports = {
// enntry file entry: {
entry: './src/index.js', app: './src/index.js'
// 컴파일 + 번들링된 js 파일이 저장될 경로와 이름 지정 },
output: { output: {
path: path.resolve(__dirname, 'dist'), filename: '[name].bundle.js',
filename: 'bundle.js' path: path.resolve(__dirname, 'public')
}, },
module: { module: {
rules: [ rules: [{
{ test: /\.(js|jsx)$/,
test: /\.js$/,
include: [
path.resolve(__dirname, 'src')
],
exclude: /node_modules/, exclude: /node_modules/,
use: { use: {
loader: 'babel-loader', loader: 'babel-loader'
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: ['@babel/plugin-proposal-class-properties']
}
} }
} }]
]
}, },
devtool: 'source-map', devServer: {
// https://webpack.js.org/concepts/mode/#mode-development hot: true,
mode: 'development' allowedHosts: 'all',
},
plugins: [
new webpack.HotModuleReplacementPlugin()
]
}; };
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment