aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/webpack.config.js
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-10-02 16:53:46 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-10-02 16:58:31 +0200
commitea509702b6ed88951a1b7b109b5dc597ee81112d (patch)
tree241b9732e7094ef22e7860a9e97a9f67b5b63509 /language-web/webpack.config.js
parentperf(web): split off CodeMirror chunks (diff)
downloadrefinery-ea509702b6ed88951a1b7b109b5dc597ee81112d.tar.gz
refinery-ea509702b6ed88951a1b7b109b5dc597ee81112d.tar.zst
refinery-ea509702b6ed88951a1b7b109b5dc597ee81112d.zip
feat(web): add client-side logging support
Also modified langauge-web/src/main/js/xtext/ServiceBuilder.js to make sure the new logger is used as soon as xtext is initialized.
Diffstat (limited to 'language-web/webpack.config.js')
-rw-r--r--language-web/webpack.config.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/language-web/webpack.config.js b/language-web/webpack.config.js
index 1bd0edb2..c51d55d6 100644
--- a/language-web/webpack.config.js
+++ b/language-web/webpack.config.js
@@ -1,11 +1,14 @@
1const fs = require('fs'); 1const fs = require('fs');
2const path = require('path'); 2const path = require('path');
3 3
4const { DefinePlugin } = require('webpack');
4const HtmlWebpackPlugin = require('html-webpack-plugin'); 5const HtmlWebpackPlugin = require('html-webpack-plugin');
5const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload'); 6const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload');
6const MiniCssExtractPlugin = require('mini-css-extract-plugin'); 7const MiniCssExtractPlugin = require('mini-css-extract-plugin');
7const { SubresourceIntegrityPlugin } = require('webpack-subresource-integrity'); 8const { SubresourceIntegrityPlugin } = require('webpack-subresource-integrity');
8 9
10const packageInfo = require('./package.json');
11
9const currentNodeEnv = process.env.NODE_ENV || 'development'; 12const currentNodeEnv = process.env.NODE_ENV || 'development';
10const devMode = currentNodeEnv !== 'production'; 13const devMode = currentNodeEnv !== 'production';
11const outputPath = path.resolve(__dirname, 'build/webpack', currentNodeEnv); 14const outputPath = path.resolve(__dirname, 'build/webpack', currentNodeEnv);
@@ -194,6 +197,11 @@ module.exports = {
194 }, 197 },
195 }, 198 },
196 plugins: [ 199 plugins: [
200 new DefinePlugin({
201 'DEBUG': JSON.stringify(devMode),
202 'PACKAGE_NAME': JSON.stringify(packageInfo.name),
203 'PACKAGE_VERSION': JSON.stringify(packageInfo.version),
204 }),
197 new MiniCssExtractPlugin({ 205 new MiniCssExtractPlugin({
198 filename: '[name].[contenthash].css', 206 filename: '[name].[contenthash].css',
199 chunkFilename: '[name].[contenthash].css', 207 chunkFilename: '[name].[contenthash].css',