organic_ast_explorer/webpack.config.js

49 lines
957 B
JavaScript
Raw Normal View History

2024-01-21 22:54:00 +00:00
const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
module.exports = {
entry: "./src/index.tsx",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.[hash].js",
},
devServer: {
compress: true,
port: 8080,
hot: true,
static: "./dist",
historyApiFallback: true,
open: true,
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
},
},
{
test: /\.tsx?$/,
exclude: /node_modules/,
use: {loader: 'ts-loader'},
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: __dirname + "/public/index.html",
filename: "index.html",
}),
],
mode: "development",
devtool: "inline-source-map",
2024-01-21 23:30:20 +00:00
experiments: {
asyncWebAssembly: true
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
2024-01-21 22:54:00 +00:00
};