From adfb9010d47c91c5cc95b764d68ec181a029b475 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 2 Dec 2021 14:50:49 +0100 Subject: Migrate to webpack v5 Signed-off-by: Louis Chemineau --- webpack.common.js | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'webpack.common.js') diff --git a/webpack.common.js b/webpack.common.js index 0656b389b31..876bb22a8a7 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ const { VueLoaderPlugin } = require('vue-loader') const path = require('path') - +const CircularDependencyPlugin = require('circular-dependency-plugin') const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except') const ESLintPlugin = require('eslint-webpack-plugin') @@ -31,7 +31,7 @@ const modulesToBuild = () => { throw new Error(`No module "${MODULE}" found`) } return formatOutputFromModules({ - [MODULE]: modules[MODULE] + [MODULE]: modules[MODULE], }) } @@ -99,29 +99,32 @@ module.exports = { { test: /\.handlebars/, loader: 'handlebars-loader', - query: { - extensions: '.handlebars', - }, }, ], }, optimization: { - splitChunks: { - automaticNameDelimiter: '-', - cacheGroups: { - vendors: { - test: /[\\/]node_modules[\\/]/, - enforce: true, - name: 'nextcloud', - chunks: 'all', - }, - }, - }, + splitChunks: false, + // { + // automaticNameDelimiter: '-', + // cacheGroups: { + // vendors: { + // test: /[\\/]node_modules[\\/]/, + // enforce: true, + // name: 'nextcloud', + // chunks: 'all', + // }, + // }, + // }, }, - plugins: [new VueLoaderPlugin(), new ESLintPlugin()], + plugins: [ + new VueLoaderPlugin(), + new ESLintPlugin(), + new CircularDependencyPlugin({ + }), + ], resolve: { alias: { OC: path.resolve(__dirname, './core/src/OC'), @@ -131,5 +134,8 @@ module.exports = { }, extensions: ['*', '.js', '.vue'], symlinks: false, + fallback: { + stream: require.resolve('stream-browserify'), + }, }, } -- cgit v1.2.3