mirror of
https://github.com/markmanx/isoflow.git
synced 2025-01-31 23:22:31 +00:00
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
const path = require('path');
|
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
const webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: './src/index.tsx',
|
|
target: 'web',
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist'),
|
|
filename: '[name].js',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(ts|tsx)$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/
|
|
},
|
|
{
|
|
test: /\.css$/i,
|
|
use: ['style-loader', 'css-loader']
|
|
},
|
|
|
|
{
|
|
test: /\.svg$/i,
|
|
type: 'asset/inline'
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new HtmlWebPackPlugin({
|
|
template: path.resolve(__dirname, '../src/index.html')
|
|
}),
|
|
new webpack.DefinePlugin({
|
|
PACKAGE_VERSION: JSON.stringify(require("../package.json").version),
|
|
REPOSITORY_URL: JSON.stringify(require("../package.json").repository.url),
|
|
})
|
|
],
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
plugins: [new TsconfigPathsPlugin()]
|
|
}
|
|
};
|