최원석3 [goesnow]

add bundles

This diff is collapsed. Click to expand it.
......@@ -23,9 +23,11 @@
},
"devDependencies": {
"@types/node": "^14.11.2",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.1.1",
"file-loader": "^6.2.0",
"gts": "^3.1.0",
"html-webpack-plugin": "^5.3.0",
"style-loader": "^2.0.0",
"ts-loader": "^8.0.17",
"typescript": "^4.0.3",
......
This diff is collapsed. Click to expand it.
......@@ -6,6 +6,5 @@
</head>
<body>
<div id="App"></div>
<script type="module" src="public/main.js" ></script>
</body>
</html>
\ No newline at end of file
......
const path = require('path')
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
mode : 'development',
......@@ -30,17 +32,23 @@ module.exports = {
extensions: [".tsx", ".ts", ".js"],
},
output : {
publicPath: '/app',
publicPath: '/app/public',
path: path.resolve('./public'),
filename: '[name].js',
},
devServer : {
port : 3000,
hot: true,
contentBase: __dirname,
contentBase: __dirname + '/public/',
inline: true,
watchOptions: {
poll: true
}
}
},
plugins : [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
template : './src/index.html'
})
]
}
\ No newline at end of file
......