Skip to content

Commit a20fa8a

Browse files
committed
Minor tweaks
1 parent 537c1a9 commit a20fa8a

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"start": "webpack-dev-server",
7+
"start": "webpack serve",
88
"build": "webpack --mode=production --node-env=production",
99
"build:dev": "webpack --mode=development",
1010
"build:prod": "webpack --mode=production --node-env=production",

src/ecg.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

webpack.config.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Generated using webpack-cli https://github.com/webpack/webpack-cli
2-
31
const path = require("path");
42
const HtmlWebpackPlugin = require("html-webpack-plugin");
53

@@ -11,13 +9,14 @@ const config = {
119
path: path.resolve(__dirname, "dist"),
1210
},
1311
devServer: {
14-
open: true,
12+
static: path.join(__dirname, 'dist'),
13+
compress: true,
1514
host: "localhost",
1615
},
1716
plugins: [
18-
new HtmlWebpackPlugin(),
19-
// Add your plugins here
20-
// Learn more about plugins from https://webpack.js.org/configuration/plugins/
17+
new HtmlWebpackPlugin({
18+
title: "lcjs-typescript-example",
19+
}),
2120
],
2221
module: {
2322
rules: [
@@ -26,21 +25,19 @@ const config = {
2625
loader: "ts-loader",
2726
exclude: ["/node_modules/"],
2827
},
29-
{
30-
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
31-
type: "asset",
32-
},
33-
34-
// Add your rules for custom modules here
35-
// Learn more about loaders from https://webpack.js.org/loaders/
3628
],
3729
},
3830
resolve: {
39-
extensions: [".tsx", ".ts", ".jsx", ".js", "..."],
31+
extensions: [".ts", ".js"],
4032
},
4133
externals: {
4234
perf_hooks: "{}",
4335
},
36+
optimization: {
37+
splitChunks: {
38+
chunks: "all",
39+
},
40+
},
4441
};
4542

4643
module.exports = () => {

0 commit comments

Comments
 (0)