From 7ee6ca9307ebcd0650620796636f76a803522fb5 Mon Sep 17 00:00:00 2001 From: josc146 Date: Thu, 13 Apr 2023 20:44:40 +0800 Subject: [PATCH] fix: katex render (#208) --- build.mjs | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/build.mjs b/build.mjs index 3adcdba..437ee08 100644 --- a/build.mjs +++ b/build.mjs @@ -19,6 +19,20 @@ async function deleteOldDir() { } async function runWebpack(isWithoutKatex, isWithoutTiktoken, callback) { + const shared = [ + 'preact', + 'webextension-polyfill', + '@primer/octicons-react', + 'react-bootstrap-icons', + 'countries-list', + 'i18next', + 'react-i18next', + 'react-tabs', + './src/utils', + './src/_locales/i18n-react', + ] + if (isWithoutKatex) shared.push('./src/components') + const compiler = webpack({ entry: { 'content-script': { @@ -36,19 +50,7 @@ async function runWebpack(isWithoutKatex, isWithoutTiktoken, callback) { import: './src/pages/IndependentPanel/index.jsx', dependOn: 'shared', }, - shared: [ - 'preact', - 'webextension-polyfill', - '@primer/octicons-react', - 'react-bootstrap-icons', - 'countries-list', - 'i18next', - 'react-i18next', - 'react-tabs', - './src/utils', - './src/_locales/i18n-react', - './src/components', - ], + shared: shared, }, output: { filename: '[name].js',