mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-16 21:22:59 +05:30
Reduce amount of chunks
This commit is contained in:
parent
19a9f952ea
commit
54c6578c15
@ -15,19 +15,11 @@ import { ComponentLoader } from 'app/components/ui/loader';
|
||||
|
||||
import styles from './profile.scss';
|
||||
|
||||
const Profile = React.lazy(() => import(/* webpackChunkName: "page-profile-index" */ 'app/pages/profile/ProfilePage'));
|
||||
const ChangePasswordPage = React.lazy(() =>
|
||||
import(/* webpackChunkName: "page-profile-change-password" */ 'app/pages/profile/ChangePasswordPage'),
|
||||
);
|
||||
const ChangeUsernamePage = React.lazy(() =>
|
||||
import(/* webpackChunkName: "page-profile-change-username" */ 'app/pages/profile/ChangeUsernamePage'),
|
||||
);
|
||||
const ChangeEmailPage = React.lazy(() =>
|
||||
import(/* webpackChunkName: "page-profile-change-email" */ 'app/pages/profile/ChangeEmailPage'),
|
||||
);
|
||||
const MultiFactorAuthPage = React.lazy(() =>
|
||||
import(/* webpackChunkName: "page-profile-mfa" */ 'app/pages/profile/MultiFactorAuthPage'),
|
||||
);
|
||||
import Profile from 'app/pages/profile/ProfilePage';
|
||||
import ChangePasswordPage from 'app/pages/profile/ChangePasswordPage';
|
||||
import ChangeUsernamePage from 'app/pages/profile/ChangeUsernamePage';
|
||||
import ChangeEmailPage from 'app/pages/profile/ChangeEmailPage';
|
||||
import MultiFactorAuthPage from 'app/pages/profile/MultiFactorAuthPage';
|
||||
|
||||
interface Props {
|
||||
userId: number;
|
||||
|
@ -21,10 +21,11 @@ import { ComponentLoader } from 'app/components/ui/loader';
|
||||
import styles from './root.scss';
|
||||
import siteName from './siteName.intl';
|
||||
|
||||
import PageNotFound from 'app/pages/404/PageNotFound';
|
||||
|
||||
const ProfileController = React.lazy(() =>
|
||||
import(/* webpackChunkName: "page-profile-all" */ 'app/pages/profile/ProfileController'),
|
||||
);
|
||||
const PageNotFound = React.lazy(() => import(/* webpackChunkName: "page-not-found" */ 'app/pages/404/PageNotFound'));
|
||||
const RulesPage = React.lazy(() => import(/* webpackChunkName: "page-rules" */ 'app/pages/rules/RulesPage'));
|
||||
const DevPage = React.lazy(() => import(/* webpackChunkName: "page-dev-applications" */ 'app/pages/dev/DevPage'));
|
||||
const AuthPage = React.lazy(() => import(/* webpackChunkName: "page-auth" */ 'app/pages/auth/AuthPage'));
|
||||
|
@ -211,7 +211,11 @@ const webpackConfig = {
|
||||
};
|
||||
|
||||
if (isAnalyze) {
|
||||
webpackConfig.plugins.push(new BundleAnalyzerPlugin());
|
||||
webpackConfig.plugins.push(
|
||||
new BundleAnalyzerPlugin({
|
||||
excludeAssets: /^(vendors~intl|locale-|intl)/,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
if (isProduction) {
|
||||
|
Loading…
Reference in New Issue
Block a user