robosats/frontend/webpack.config.ts

34 lines
678 B
TypeScript
Raw Normal View History

import path from "path";
import { Configuration } from "webpack";
const config: Configuration = {
entry: "./src/index.js",
module: {
rules: [
{
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript",
],
},
},
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".jsx", ".js"],
},
output: {
path: path.resolve(__dirname, "static/frontend"),
filename: "main.js",
},
};
export default config;