mirror of
https://github.com/zoriya/Aeris.git
synced 2025-12-06 06:36:12 +00:00
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
const path = require("path");
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
|
|
module.exports = {
|
|
entry: "./src/index.tsx",
|
|
output: { path: path.join(__dirname, "build"), filename: "index.bundle.js" },
|
|
mode: process.env.NODE_ENV || "development",
|
|
resolve: {
|
|
extensions: [".tsx", ".ts", ".js"],
|
|
},
|
|
devServer: { contentBase: path.join(__dirname, "src") },
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(ts|tsx)$/,
|
|
exclude: /node_modules/,
|
|
use: ["ts-loader"],
|
|
},
|
|
{
|
|
test: /\.(js|tsx)$/,
|
|
exclude: /node_modules/,
|
|
use: ["babel-loader"],
|
|
},
|
|
{
|
|
test: /\.(css|scss)$/,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
{
|
|
test: /\.(jpg|jpeg|png|gif|mp3|svg)$/,
|
|
use: ["file-loader"],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: path.join(__dirname, "src", "index.html"),
|
|
}),
|
|
],
|
|
}; |