From 2e4f0827d16984f10faa9f3fdc01deaa09ff7953 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Sun, 19 Mar 2023 19:11:48 -0600 Subject: [PATCH] Update config to suit current webpack --- .../console-app/webpack-analyzer.config.js | 2 +- packages/console-app/webpack-common.config.js | 27 +++++++++++-------- packages/console-app/webpack.config.js | 2 +- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/packages/console-app/webpack-analyzer.config.js b/packages/console-app/webpack-analyzer.config.js index 26bd6fa..77c8cd1 100644 --- a/packages/console-app/webpack-analyzer.config.js +++ b/packages/console-app/webpack-analyzer.config.js @@ -2,7 +2,7 @@ // Copyright 2019 DXOS.org // -const merge = require('webpack-merge'); +const { merge } = require('webpack-merge'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const baseConfig = require('./webpack-common.config'); diff --git a/packages/console-app/webpack-common.config.js b/packages/console-app/webpack-common.config.js index e42522c..6ef8a51 100644 --- a/packages/console-app/webpack-common.config.js +++ b/packages/console-app/webpack-common.config.js @@ -14,19 +14,24 @@ const CONFIG_FILE = path.relative('./src', process.env.CONFIG_FILE || 'config-lo module.exports = { devtool: 'eval-source-map', - devServer: { - contentBase: path.join(__dirname, 'dist'), - compress: true, - disableHostCheck: true, - port: 8080, - watchOptions: { - ignored: /node_modules/, - aggregateTimeout: 600 - } + watchOptions: { + ignored: /node_modules/, + aggregateTimeout: 600 }, - node: { - fs: 'empty' + devServer: { + static: { + directory: path.join(__dirname, "dist") + }, + compress: true, + allowedHosts: "all", + port: 8080 + }, + + resolve: { + fallback: { + fs: false + } }, output: { diff --git a/packages/console-app/webpack.config.js b/packages/console-app/webpack.config.js index 4097fab..7635931 100644 --- a/packages/console-app/webpack.config.js +++ b/packages/console-app/webpack.config.js @@ -2,7 +2,7 @@ // Copyright 2019 DXOS.org // -const merge = require('webpack-merge'); +const { merge } = require('webpack-merge'); const HtmlWebPackPlugin = require('html-webpack-plugin'); const commonConfig = require('./webpack-common.config');