From 48c41cad06b1ade58968cc161bf5f9c1ce78200b Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Fri, 16 Feb 2024 20:55:31 +0000 Subject: [PATCH] typo js -> .js, channelsIndexDb -> IndexedDb, and add a way to access version info --- webpack.config.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index fe82740..b2c08b3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,10 +1,18 @@ const path = require('path'); +// Export version info to a file +const fs = require('fs'); +fs.writeFileSync(path.resolve(path.join(__dirname, 'src/version.ts')), +`// This file is auto-generated by the build system. +import * as pkg from '../package.json'; +export const BundleVersion = pkg.name + '-' + pkg.version; +`); + module.exports = { entry: { bundle: './src/index.ts', logFileWorker: './assets/jsutils/logFileWorker.js', - channelsIndexDbWorker: './assets/jsutils/channelsIndexedDbWorker.js', + channelsIndexedDbWorker: './assets/jsutils/channelsIndexedDbWorker.js', dmIndexedDbWorker: './assets/jsutils/dmIndexedDbWorker.js', ndf: './assets/jsutils/ndf.js', stateIndexedDbWorker: './assets/jsutils/stateIndexedDbWorker.js', @@ -40,6 +48,6 @@ module.exports = { ] }, resolve: { - extensions: ['.tsx', '.ts', 'js' ], - }, + extensions: ['.tsx', '.ts', '.js' ], + } }; -- GitLab