Merge branch 'optimize' into shigusegubu-themes3
This commit is contained in:
commit
e76e32adbc
7 changed files with 197 additions and 1458 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -11,5 +11,6 @@ selenium-debug.log
|
||||||
.gitlab-ci-local/
|
.gitlab-ci-local/
|
||||||
config/local.json
|
config/local.json
|
||||||
src/assets/emoji.json
|
src/assets/emoji.json
|
||||||
|
stats.html
|
||||||
logs/
|
logs/
|
||||||
__screenshots__/
|
__screenshots__/
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ export const buildSwPlugin = ({ swSrc, swDest }) => {
|
||||||
formats: ['iife'],
|
formats: ['iife'],
|
||||||
name: 'sw_pleroma',
|
name: 'sw_pleroma',
|
||||||
},
|
},
|
||||||
emptyOutDir: true,
|
emptyOutDir: false,
|
||||||
rolldownOptions: {
|
rolldownOptions: {
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: swDest,
|
entryFileNames: swDest,
|
||||||
|
|
|
||||||
1
changelog.d/fast.change
Normal file
1
changelog.d/fast.change
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Migrated to Vite 8 and optimized our imports, more stuff is loaded on-demand, reducing the initial load time and transfer size
|
||||||
|
|
@ -102,6 +102,7 @@
|
||||||
"postcss": "8.5.6",
|
"postcss": "8.5.6",
|
||||||
"postcss-html": "^1.5.0",
|
"postcss-html": "^1.5.0",
|
||||||
"postcss-scss": "^4.0.6",
|
"postcss-scss": "^4.0.6",
|
||||||
|
"rollup-plugin-visualizer": "^7.0.1",
|
||||||
"sass": "1.93.2",
|
"sass": "1.93.2",
|
||||||
"selenium-server": "3.141.59",
|
"selenium-server": "3.141.59",
|
||||||
"semver": "7.7.3",
|
"semver": "7.7.3",
|
||||||
|
|
@ -117,7 +118,6 @@
|
||||||
"stylelint-config-standard": "38.0.0",
|
"stylelint-config-standard": "38.0.0",
|
||||||
"vite": "^8.0.0",
|
"vite": "^8.0.0",
|
||||||
"vite-plugin-eslint2": "^5.1.0",
|
"vite-plugin-eslint2": "^5.1.0",
|
||||||
"vite-plugin-pwa": "^1.3.0",
|
|
||||||
"vite-plugin-stylelint": "^6.1.0",
|
"vite-plugin-stylelint": "^6.1.0",
|
||||||
"vitest": "^3.0.7",
|
"vitest": "^3.0.7",
|
||||||
"vue-eslint-parser": "10.2.0"
|
"vue-eslint-parser": "10.2.0"
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import 'virtual:pleroma-fe/service_worker_env'
|
||||||
|
|
||||||
import { createI18n } from 'vue-i18n'
|
import { createI18n } from 'vue-i18n'
|
||||||
|
|
||||||
|
import { storage } from 'src/lib/storage.js'
|
||||||
import { INSTANCE_DEFAULT_CONFIG } from 'src/modules/default_config_state.js'
|
import { INSTANCE_DEFAULT_CONFIG } from 'src/modules/default_config_state.js'
|
||||||
import { parseNotification } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
import { parseNotification } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||||
import { prepareNotificationObject } from 'src/services/notification_utils/notification_utils.js'
|
import { prepareNotificationObject } from 'src/services/notification_utils/notification_utils.js'
|
||||||
|
|
@ -34,7 +35,7 @@ function getWindowClients() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const setSettings = async () => {
|
const setSettings = async () => {
|
||||||
const piniaState = {}
|
const piniaState = await storage.getItem('pinia-local-sync_config')
|
||||||
const locale = piniaState.prefsStorage.simple.interfaceLanguage || 'en'
|
const locale = piniaState.prefsStorage.simple.interfaceLanguage || 'en'
|
||||||
i18n.locale = locale
|
i18n.locale = locale
|
||||||
const notificationsNativeArray = Object.entries(
|
const notificationsNativeArray = Object.entries(
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import vue from '@vitejs/plugin-vue'
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import { DevTools } from '@vitejs/devtools'
|
import { DevTools } from '@vitejs/devtools'
|
||||||
|
|
||||||
import eslint from 'vite-plugin-eslint2'
|
import eslint from 'vite-plugin-eslint2'
|
||||||
import stylelint from 'vite-plugin-stylelint'
|
import stylelint from 'vite-plugin-stylelint'
|
||||||
import { configDefaults } from 'vitest/config'
|
import { configDefaults } from 'vitest/config'
|
||||||
|
|
@ -12,6 +13,7 @@ import { getCommitHash } from './build/commit_hash.js'
|
||||||
import copyPlugin from './build/copy_plugin.js'
|
import copyPlugin from './build/copy_plugin.js'
|
||||||
import emojisPlugin from './build/emojis_plugin.js'
|
import emojisPlugin from './build/emojis_plugin.js'
|
||||||
import mswPlugin from './build/msw_plugin.js'
|
import mswPlugin from './build/msw_plugin.js'
|
||||||
|
import { visualizer } from "rollup-plugin-visualizer";
|
||||||
import {
|
import {
|
||||||
buildSwPlugin,
|
buildSwPlugin,
|
||||||
devSwPlugin,
|
devSwPlugin,
|
||||||
|
|
@ -144,6 +146,7 @@ export default defineConfig(async ({ mode, command }) => {
|
||||||
}),
|
}),
|
||||||
devSwPlugin({ swSrc, swDest, transformSW, alias }),
|
devSwPlugin({ swSrc, swDest, transformSW, alias }),
|
||||||
buildSwPlugin({ swSrc, swDest }),
|
buildSwPlugin({ swSrc, swDest }),
|
||||||
|
visualizer(),
|
||||||
swMessagesPlugin(),
|
swMessagesPlugin(),
|
||||||
emojisPlugin(),
|
emojisPlugin(),
|
||||||
copyPlugin({
|
copyPlugin({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue