Skip to content

Commit

Permalink
Added distance site code
Browse files Browse the repository at this point in the history
Added distance.ts and distance.html to code, and configured to handle two ts entries and two html sites.
  • Loading branch information
MichaelDykesBC authored Oct 17, 2024
1 parent 4a544af commit ef56272
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions frontend/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { Configuration } from 'webpack';

const config: Configuration = {
context: path.resolve(__dirname, './src'),
entry: { app: './index.ts' },
entry: { app: './index.ts',
distance: '/distance.ts' },
module: {
rules: [
{
Expand Down Expand Up @@ -49,6 +50,12 @@ const config: Configuration = {
filename: 'index.html',
chunks: ['vendors', 'app'],
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'src', 'distance.html'),
title: 'Leaflet Typescript Distance',
filename: 'distance.html',
chunks: ['vendors', 'distance'],
}),
new MiniCssExtractPlugin({
filename: 'style.css',
chunkFilename: 'style.css',
Expand All @@ -61,4 +68,4 @@ const config: Configuration = {
},
};

export default config;
export default config;

0 comments on commit ef56272

Please sign in to comment.