Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-12-02 20:57:11 +0300
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-01-08 12:14:50 +0300
commit87d0904b6f6209a553efd5d405c917012a91e259 (patch)
tree8f5d1c53a68cd192fa3b318c63eba0b9108b40a0 /webpack.common.js
parent74b980310852a0b406fa9d073870f92c409d5444 (diff)
Split common vendor chunk
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'webpack.common.js')
-rw-r--r--webpack.common.js32
1 files changed, 15 insertions, 17 deletions
diff --git a/webpack.common.js b/webpack.common.js
index 887dc9f8f5e..1f9cecc2d2a 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -1,7 +1,6 @@
/* 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')
const webpack = require('webpack')
@@ -113,25 +112,25 @@ module.exports = {
},
optimization: {
- splitChunks: false,
- // {
- // automaticNameDelimiter: '-',
- // cacheGroups: {
- // vendors: {
- // test: /[\\/]node_modules[\\/]/,
- // enforce: true,
- // name: 'nextcloud',
- // chunks: 'all',
- // },
- // },
- // },
+ splitChunks: {
+ automaticNameDelimiter: '-',
+ cacheGroups: {
+ vendors: {
+ // split every dependency into one bundle
+ test: /[\\/]node_modules[\\/]/,
+ enforce: true,
+ // necessary to keep this name to properly inject it
+ // see OC_Template.php
+ name: 'core-common',
+ chunks: 'all',
+ },
+ },
+ },
},
plugins: [
new VueLoaderPlugin(),
new ESLintPlugin(),
- new CircularDependencyPlugin({
- }),
new webpack.ProvidePlugin({
_: 'underscore',
$: 'jquery',
@@ -140,8 +139,6 @@ module.exports = {
],
resolve: {
alias: {
- OC: path.resolve(__dirname, './core/src/OC'),
- OCA: path.resolve(__dirname, './core/src/OCA'),
// make sure to use the handlebar runtime when importing
handlebars: 'handlebars/runtime',
},
@@ -149,6 +146,7 @@ module.exports = {
symlinks: false,
fallback: {
stream: require.resolve('stream-browserify'),
+ buffer: require.resolve('buffer'),
},
},
}