mirror of
https://github.com/markmanx/isoflow.git
synced 2025-01-31 23:22:31 +00:00
42 lines
936 B
JavaScript
42 lines
936 B
JavaScript
const path = require("path");
|
|
const HtmlWebPackPlugin = require("html-webpack-plugin");
|
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: "development",
|
|
entry: "./src/index.tsx",
|
|
devtool: "eval-cheap-source-map",
|
|
output: {
|
|
filename: "main.js",
|
|
path: path.resolve(__dirname, "build"),
|
|
},
|
|
devServer: {
|
|
static: {
|
|
directory: path.join(__dirname, "build"),
|
|
},
|
|
allowedHosts: ['.csb.app'],
|
|
port: 3000,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(ts|tsx)$/,
|
|
use: "ts-loader",
|
|
exclude: /node_modules/,
|
|
},
|
|
{
|
|
test: /\.css$/i,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: [".tsx", ".ts", ".js"],
|
|
plugins: [new TsconfigPathsPlugin()],
|
|
},
|
|
plugins: [
|
|
new HtmlWebPackPlugin({
|
|
template: path.resolve(__dirname, "../src/index.html"),
|
|
}),
|
|
],
|
|
};
|