logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: a758e18dceb4cb11d84d6dff1cdfddb755af60db
parent 6fab7b9e3ffb4a9bce2788174ef0e9e6eef7b2c5
Author: Tusooa Zhu <tusooa@kazv.moe>
Date:   Tue, 20 Sep 2022 23:13:07 -0400

Make chunks named

Diffstat:

M.babelrc2+-
Mbuild/webpack.base.conf.js3++-
Msrc/i18n/messages.js1+
Msrc/modules/instance.js3++-
4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/.babelrc b/.babelrc @@ -1,5 +1,5 @@ { "presets": ["@babel/preset-env"], "plugins": ["@babel/plugin-transform-runtime", "lodash", "@vue/babel-plugin-jsx"], - "comments": false + "comments": true } diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js @@ -24,7 +24,8 @@ module.exports = { output: { path: config.build.assetsRoot, publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath, - filename: '[name].js' + filename: '[name].js', + chunkFilename: '[name].js' }, optimization: { splitChunks: { diff --git a/src/i18n/messages.js b/src/i18n/messages.js @@ -14,6 +14,7 @@ const hasLanguageFile = (code) => languages.includes(code) const loadLanguageFile = (code) => { return import( /* webpackInclude: /\.json$/ */ + /* webpackChunkName: "i18n/[request]" */ `./${langCodeToJsonName(code)}.json` ) } diff --git a/src/modules/instance.js b/src/modules/instance.js @@ -133,6 +133,7 @@ const defaultState = { const loadAnnotations = (lang) => { return import( + /* webpackChunkName: "emoji-annotations/[request]" */ `@kazvmoe-infra/unicode-emoji-json/annotations/${langCodeToCldrName(lang)}.json` ) .then(k => k.default) @@ -234,7 +235,7 @@ const instance = { }, async getStaticEmoji ({ commit }) { try { - const values = (await import('../../static/emoji.json')).default + const values = (await import(/* webpackChunkName: 'emoji' */ '../../static/emoji.json')).default const emoji = Object.keys(values).reduce((res, groupId) => { res[groupId] = values[groupId].map(e => ({