apple1js/webpack.config.js

48 lines
1000 B
JavaScript
Raw Normal View History

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