Skip to content

Commit

Permalink
Merge pull request 'feature/revert-mobile-chunks' (#22) from feature/…
Browse files Browse the repository at this point in the history
…revert-mobile-chunks into release/v8.2.0

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/web-apps/pulls/22
  • Loading branch information
maxkadushkin committed Sep 15, 2024
2 parents 39c23fd + 7c511f2 commit f784f35
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions vendor/framework7-react/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const config = {
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-proposal-decorators', {'legacy': true }],
['@babel/plugin-transform-class-properties', { 'loose': false }],
'@babel/plugin-transform-optional-chaining',
'@babel/plugin-transform-nullish-coalescing-operator',
'@babel/plugin-transform-react-constant-elements',
// '@babel/plugin-transform-optional-chaining',
// '@babel/plugin-transform-nullish-coalescing-operator',
// '@babel/plugin-transform-react-constant-elements',
]
};

Expand Down
54 changes: 27 additions & 27 deletions vendor/framework7-react/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import HtmlWebpackPlugin from 'html-webpack-plugin';
import MiniCssExtractPlugin from "mini-css-extract-plugin";
import CssMinimizerPlugin from "css-minimizer-webpack-plugin";
import TerserPlugin from "terser-webpack-plugin";
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
// import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from "url";
Expand All @@ -29,8 +29,8 @@ const config = {
},
output: {
path: resolvePath(`../../apps/${editor}/mobile`),
filename: 'dist/js/[name].[contenthash].js',
chunkFilename: 'dist/js/[name].[contenthash].js',
filename: 'dist/js/[name].js',
chunkFilename: 'dist/js/[name].js',
publicPath: '',
hotUpdateChunkFilename: 'hot/hot-update.js',
hotUpdateMainFilename: 'hot/hot-update.json',
Expand All @@ -50,28 +50,28 @@ const config = {
externals: {
jquery: 'jQuery'
},
devtool: env === 'production' ? false : 'source-map',
devtool: env === 'production' ? 'source-map' : 'source-map',
optimization: {
splitChunks: {
chunks: 'all',
minSize: 20000,
maxSize: 244000,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
enforce: true,
},
common: {
name: 'common',
minChunks: 2,
chunks: 'all',
reuseExistingChunk: true,
enforce: true,
}
}
},
// splitChunks: {
// chunks: 'all',
// minSize: 20000,
// maxSize: 244000,
// cacheGroups: {
// vendor: {
// test: /[\\/]node_modules[\\/]/,
// name: 'vendors',
// chunks: 'all',
// enforce: true,
// },
// common: {
// name: 'common',
// minChunks: 2,
// chunks: 'all',
// reuseExistingChunk: true,
// enforce: true,
// }
// }
// },
minimizer: [
new TerserPlugin({
terserOptions: {
Expand Down Expand Up @@ -281,9 +281,9 @@ const config = {
fs.existsSync(`../../../web-apps-mobile/${targetPatch}/patch.jsx`) ?
resource.request = `../../../../../../web-apps-mobile/${targetPatch}/patch.jsx` : resource
),
new BundleAnalyzerPlugin({
analyzerMode: env === 'development' ? 'server' : 'disabled',
}),
// new BundleAnalyzerPlugin({
// analyzerMode: env === 'development' ? 'server' : 'disabled',
// }),
],
};

Expand Down

0 comments on commit f784f35

Please sign in to comment.