Skip to content

Commit 6bcfff9

Browse files
committed
fix: katex render (#208)
1 parent b17a458 commit 6bcfff9

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

build.mjs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ async function deleteOldDir() {
1919
}
2020

2121
async function runWebpack(isWithoutKatex, isWithoutTiktoken, callback) {
22+
const shared = [
23+
'preact',
24+
'webextension-polyfill',
25+
'@primer/octicons-react',
26+
'react-bootstrap-icons',
27+
'countries-list',
28+
'i18next',
29+
'react-i18next',
30+
'react-tabs',
31+
'./src/utils',
32+
'./src/_locales/i18n-react',
33+
]
34+
if (isWithoutKatex) shared.push('./src/components')
35+
2236
const compiler = webpack({
2337
entry: {
2438
'content-script': {
@@ -36,19 +50,7 @@ async function runWebpack(isWithoutKatex, isWithoutTiktoken, callback) {
3650
import: './src/pages/IndependentPanel/index.jsx',
3751
dependOn: 'shared',
3852
},
39-
shared: [
40-
'preact',
41-
'webextension-polyfill',
42-
'@primer/octicons-react',
43-
'react-bootstrap-icons',
44-
'countries-list',
45-
'i18next',
46-
'react-i18next',
47-
'react-tabs',
48-
'./src/utils',
49-
'./src/_locales/i18n-react',
50-
'./src/components',
51-
],
53+
shared: shared,
5254
},
5355
output: {
5456
filename: '[name].js',

0 commit comments

Comments
 (0)