Mise à niveau de webpack-dev-server vers 4.1.0 + évolution configuration webpack.

This commit is contained in:
Fabrice PENHOËT 2021-09-03 17:33:00 +02:00
parent 3f332381be
commit 3789606764
3 changed files with 446 additions and 1901 deletions

2338
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,7 @@
"typescript": "^4.4.2", "typescript": "^4.4.2",
"webpack": "^5.51.1", "webpack": "^5.51.1",
"webpack-cli": "^4.8.0", "webpack-cli": "^4.8.0",
"webpack-dev-server": "^3.11.2" "webpack-dev-server": "^4.1.0"
}, },
"dependencies": { "dependencies": {
"natural-orderby": "^2.0.3", "natural-orderby": "^2.0.3",

View File

@ -3,15 +3,14 @@ const path = require('path');
module.exports = module.exports =
{ {
mode: "development", mode: "development",
devtool: "inline-source-map",
entry: entry:
{ {
firstExample: "./src/firstExample.ts", firstExample: "./src/firstExample.ts",
}, },
output: output:
{ {
filename: "./JS/[name].app.js", path: path.resolve(__dirname, "public"),
path: path.resolve(__dirname, "public") filename: "JS/[name].app.js"
}, },
resolve: { resolve: {
extensions: ['.tsx', '.ts', '.js'], extensions: ['.tsx', '.ts', '.js'],
@ -26,6 +25,6 @@ module.exports =
], ],
}, },
devServer: { devServer: {
contentBase: path.join(__dirname, "public") static: path.join(__dirname, "public")
}, },
}; };