mirror of
https://github.com/dagu-org/dagu.git
synced 2025-12-27 22:26:13 +00:00
59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const { merge } = require('webpack-merge');
|
|
const common = require('./webpack.common.js');
|
|
const path = require('path');
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = merge(common, {
|
|
mode: 'development',
|
|
devtool: 'eval-source-map',
|
|
profile: true,
|
|
devServer: {
|
|
historyApiFallback: true,
|
|
port: 8081,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: [
|
|
{
|
|
loader: 'esbuild-loader',
|
|
options: {
|
|
loader: 'tsx',
|
|
target: 'es2015',
|
|
},
|
|
},
|
|
],
|
|
include: path.resolve(__dirname, 'src'),
|
|
exclude: path.resolve(__dirname, 'node_modules'),
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: 'index.html',
|
|
}),
|
|
new CopyWebpackPlugin({
|
|
patterns: [
|
|
{
|
|
from: 'favicon.ico',
|
|
to: 'assets/favicon.ico',
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
optimization: {
|
|
removeAvailableModules: false,
|
|
removeEmptyChunks: false,
|
|
splitChunks: false,
|
|
},
|
|
output: {
|
|
filename: 'bundle.js',
|
|
pathinfo: false,
|
|
path: path.resolve(__dirname, 'dist'),
|
|
publicPath: '/',
|
|
clean: true,
|
|
},
|
|
});
|