From 6839831af54cd9302119bcc3bffafe10475958d4 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 3 Aug 2026 14:31:25 +0200 Subject: refactor project structure * merge sites into single project root * fix name of mass-graduation site * enable typescript support --- cockpit/webpack.config.js | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 cockpit/webpack.config.js (limited to 'cockpit/webpack.config.js') diff --git a/cockpit/webpack.config.js b/cockpit/webpack.config.js deleted file mode 100644 index 88aad41..0000000 --- a/cockpit/webpack.config.js +++ /dev/null @@ -1,44 +0,0 @@ -const webpack = require('webpack'); -const path = require('path'); - -const isProduction = process.env.NODE_ENV === 'production'; -const isMock = process.env.NODE_ENV === 'mock'; - -const config = { - entry: './js/cockpit.js', - output: { - path: path.resolve(__dirname, 'dist'), - }, - module: { - rules: [ - { - test: /\.png/, - type: 'asset/inline', - }, - ], - }, - plugins: [ - new webpack.NormalModuleReplacementPlugin( - /-ENV.js/, - (resource) => { - resource.request = resource.request.replace( - /-ENV/, - `-${isMock ? "mock" : "prod"}`, - ); - - if (resource.createData) { - resource.createData.request = resource.request; - } - } - ) - ], -}; - -module.exports = () => { - if (isProduction) { - config.mode = 'production'; - } else { - config.mode = 'development'; - } - return config; -}; -- cgit v1.2.3