You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

40 lines
868 B

const path = require("path");
const webpack = require("webpack");
module.exports = {
devServer: {
port: 9000,
static: {
directory: path.join(__dirname, "dist"),
},
},
devtool: "inline-source-map",
entry: ["./lib/index.ts"],
mode: process.env.NODE_ENV === "production" ? "production" : "development",
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: "ts-loader",
},
{
test: /\.(frag|vert)$/,
type: "asset/source",
},
],
},
output: {
path: path.join(__dirname, "dist", "build"),
publicPath: "/build",
filename: "bundle.js",
},
performance: {
maxEntrypointSize: 512000,
maxAssetSize: 512000,
},
plugins: [new webpack.EnvironmentPlugin({ NODE_ENV: "development" })],
resolve: {
extensions: [".js", ".ts"],
},
};