mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-29 11:18:25 +08:00
chore: reduce package size
This commit is contained in:
@@ -41,7 +41,7 @@ async function runWebpack(isWithoutKatex, isWithoutTiktoken, callback) {
|
||||
'i18next',
|
||||
'react-i18next',
|
||||
'./src/utils',
|
||||
'./src/_locales/i18n',
|
||||
'./src/_locales/i18n-react',
|
||||
],
|
||||
},
|
||||
output: {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import i18n from 'i18next'
|
||||
import { initReactI18next } from 'react-i18next'
|
||||
import { resources } from './resources'
|
||||
|
||||
i18n.use(initReactI18next).init({
|
||||
resources,
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
escapeValue: false, // not needed for react as it escapes by default
|
||||
},
|
||||
})
|
||||
@@ -1,8 +1,7 @@
|
||||
import i18n from 'i18next'
|
||||
import { initReactI18next } from 'react-i18next'
|
||||
import { resources } from './resources'
|
||||
|
||||
i18n.use(initReactI18next).init({
|
||||
i18n.init({
|
||||
resources,
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import FloatingToolbar from '../components/FloatingToolbar'
|
||||
import Browser from 'webextension-polyfill'
|
||||
import { getPreferredLanguage } from '../config/language.mjs'
|
||||
import '../_locales/i18n'
|
||||
import '../_locales/i18n-react'
|
||||
import { changeLanguage } from 'i18next'
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { render } from 'preact'
|
||||
import Popup from './Popup'
|
||||
import '../_locales/i18n'
|
||||
import '../_locales/i18n-react'
|
||||
|
||||
render(<Popup />, document.getElementById('app'))
|
||||
|
||||
Reference in New Issue
Block a user