apple2js/webpack.config.js
Ian Flanigan 54eddb178c
Update webpack-dev-server to 4.0.0-beta1 (#71)
When using the old webpack-dev-server with webpack 5+, we get bitten
by webpack/webpack-dev-server#2692. This upgrades to 4.0.0-beta1 which
also (unhelpfully) changes the config options.  The `watchContentBase`
and `watchOptions` don't seem to have analogs in the new versions, but
I left them commented out for future reference.

Also, this does not update `package-lock.json` because even just
updating locally gave different output since I'm on a different
version of node, I'm guessing.
2021-03-26 13:21:45 -07:00

65 lines
1.4 KiB
JavaScript

const path = require('path');
module.exports =
{
devtool: 'source-map',
mode: 'development',
entry: {
main2: path.resolve('js/entry2.js'),
main2e: path.resolve('js/entry2e.js')
},
output: {
path: path.resolve('dist/'),
library: {
name: 'Apple2',
type: 'umd',
export: 'Apple2',
},
},
devServer: {
compress: true,
static: {
watch: false,
directory: __dirname,
},
dev: {
publicPath: '/dist/',
},
// watchContentBase: true,
// watchOptions: {
// ignored: ['**/node_modules/', '**/.git/']
},
module: {
rules: [
{
test: /\.2mg$/i,
use: [
{
loader: 'file-loader',
},
],
},
{
test: /\.rom$/i,
use: [
{
loader: 'raw-loader',
},
],
},
{
test: /\.ts$/i,
use: [
{
loader: 'ts-loader'
},
],
exclude: /node_modules/,
}
],
},
resolve: {
extensions: ['.ts', '.js'],
},
};