mirror of
https://github.com/markmanx/isoflow.git
synced 2025-01-31 23:22:31 +00:00
54 lines
1.1 KiB
JavaScript
54 lines
1.1 KiB
JavaScript
const path = require('path');
|
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: {
|
|
'index': './src/Isoflow.tsx',
|
|
'/validation/scene': './src/validation/scene.ts',
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist'),
|
|
filename: '[name].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()]
|
|
}
|
|
};
|