isoflow/webpack/prod.config.js
Mark Mankarious 773473b58e
refactor: integrates the renderer with react
Migrates away from using a standalone renderer and mobx for plumbing.  Previously there was a lot of manual syncing needed between the React UI and the Renderer, which added a lot of overhead and complexity. 

Scene state is now held in a store (facilitated by Zustand).  This acts as a single source of truth shared over the renderer and the UI, and both react to changes on the store.
2023-07-20 16:45:54 +01:00

43 lines
884 B
JavaScript

const path = require("path");
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
mode: "production",
entry: "./src/App.tsx",
output: {
path: path.resolve(__dirname, "../dist"),
filename: "index.js",
libraryTarget: "commonjs2",
},
externals: {
react: {
commonjs: "react",
commonjs2: "react",
amd: "React",
root: "React",
},
"react-dom": {
commonjs: "react-dom",
commonjs2: "react-dom",
amd: "ReactDOM",
root: "ReactDOM",
},
},
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()]
},
};