mirror of
https://github.com/markmanx/isoflow.git
synced 2025-01-31 23:22:31 +00:00
51 lines
1,017 B
JavaScript
51 lines
1,017 B
JavaScript
const path = require("path");
|
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: "production",
|
|
entry: "./src/Isoflow.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"],
|
|
},
|
|
{
|
|
test: /\.svg$/,
|
|
use: [
|
|
{
|
|
loader: 'svg-url-loader'
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: [".tsx", ".ts", ".js"],
|
|
plugins: [new TsconfigPathsPlugin()]
|
|
},
|
|
};
|