2019-09-05 01:42:09 +00:00
|
|
|
const path = require('path');
|
|
|
|
|
2024-09-17 04:11:58 +00:00
|
|
|
module.exports = {
|
2021-11-26 21:01:08 +00:00
|
|
|
mode: 'development',
|
2019-09-05 01:42:09 +00:00
|
|
|
devtool: 'source-map',
|
|
|
|
entry: {
|
2024-09-17 04:11:58 +00:00
|
|
|
apple1: path.resolve('js/entry1.js'),
|
2019-09-05 01:42:09 +00:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve('dist/'),
|
|
|
|
},
|
2023-08-06 01:14:59 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.ts$/i,
|
|
|
|
use: [
|
|
|
|
{
|
2024-09-17 04:11:58 +00:00
|
|
|
loader: 'ts-loader',
|
2023-08-06 01:14:59 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
exclude: /node_modules/,
|
2024-09-17 04:11:58 +00:00
|
|
|
},
|
|
|
|
],
|
2023-08-06 01:14:59 +00:00
|
|
|
},
|
|
|
|
resolve: {
|
2024-09-17 04:11:58 +00:00
|
|
|
extensions: ['.ts', '.js'],
|
2023-08-06 01:14:59 +00:00
|
|
|
alias: {
|
2024-09-17 04:11:58 +00:00
|
|
|
js: path.resolve(__dirname, 'js/'),
|
|
|
|
},
|
2023-08-06 01:14:59 +00:00
|
|
|
},
|
2019-09-05 01:42:09 +00:00
|
|
|
devServer: {
|
|
|
|
compress: true,
|
2021-11-26 21:01:08 +00:00
|
|
|
static: {
|
|
|
|
watch: {
|
2024-09-17 04:11:58 +00:00
|
|
|
ignored: /(node_modules|test|\.git)/,
|
2021-11-26 21:01:08 +00:00
|
|
|
},
|
|
|
|
directory: __dirname,
|
|
|
|
},
|
|
|
|
devMiddleware: {
|
|
|
|
publicPath: '/dist/',
|
|
|
|
},
|
|
|
|
},
|
2019-09-05 01:42:09 +00:00
|
|
|
};
|