|
|
@ -0,0 +1,30 @@ |
|
|
|
const path = require("path"); |
|
|
|
const webpack = require("webpack"); |
|
|
|
|
|
|
|
module.exports = { |
|
|
|
devServer: { |
|
|
|
contentBase: path.join(__dirname, "dist"), |
|
|
|
port: 9000, |
|
|
|
}, |
|
|
|
devtool: "inline-source-map", |
|
|
|
entry: ["./index.ts"], |
|
|
|
mode: process.env.NODE_ENV === "production" ? "production" : "development", |
|
|
|
module: { |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
test: /\.ts$/, |
|
|
|
exclude: /node_modules/, |
|
|
|
use: "ts-loader", |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
output: { |
|
|
|
path: path.join(__dirname, "dist", "build"), |
|
|
|
filename: "bundle.js", |
|
|
|
}, |
|
|
|
performance: { |
|
|
|
maxEntrypointSize: 512000, |
|
|
|
maxAssetSize: 512000, |
|
|
|
}, |
|
|
|
plugins: [new webpack.EnvironmentPlugin({ NODE_ENV: "development" })], |
|
|
|
}; |