mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
e8cd85f54a
This change adds basic, non-optimal support for Typescript with webpack. It functions well in development mode and deployment boots ProDOS. There are probably many ways this configuration can be sped up, but I haven't investigated that yet. Note that no Typescript files are added in this change; it is merely a configuration change.
57 lines
1.2 KiB
JavaScript
57 lines
1.2 KiB
JavaScript
const path = require('path');
|
|
|
|
module.exports =
|
|
{
|
|
devtool: 'source-map',
|
|
entry: {
|
|
main2: path.resolve('js/entry2.js'),
|
|
main2e: path.resolve('js/entry2e.js')
|
|
},
|
|
output: {
|
|
path: path.resolve('dist/'),
|
|
library: 'Apple2',
|
|
libraryExport: 'Apple2',
|
|
libraryTarget: 'var'
|
|
},
|
|
devServer: {
|
|
compress: true,
|
|
publicPath: '/dist/',
|
|
watchContentBase: true,
|
|
watchOptions: {
|
|
ignored: /node_modules/
|
|
}
|
|
},
|
|
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'],
|
|
},
|
|
};
|