Skip to content

Commit

Permalink
update webpack dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak committed Jun 21, 2024
1 parent f09d5f8 commit fd03d39
Show file tree
Hide file tree
Showing 3 changed files with 394 additions and 189 deletions.
6 changes: 3 additions & 3 deletions examples/canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "webpack",
"clean": "rm -rf dist/ node_modules/",
"dev": "webpack-dev-server --hot",
"dev": "webpack serve",
"start": "ts-node ./src/index.ts"
},
"dependencies": {
Expand All @@ -24,7 +24,7 @@
"ts-loader": "^9.3.1",
"typescript": "^4.7.4",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
}
}
8 changes: 8 additions & 0 deletions examples/canvas/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ const webpack = require("webpack");
module.exports = {
mode: "production",
entry: path.resolve(__dirname, "./src/index.ts"),
devServer: {
static: {
directory: path.join(__dirname, "public"),
},
compress: true,
host: "0.0.0.0",
port: 3000,
},
module: {
rules: [
{
Expand Down
Loading

0 comments on commit fd03d39

Please sign in to comment.