Replace Webpack with Vite (#4765)
Co-authored-by: Tom Moor <tom@getoutline.com> Co-authored-by: Vio <vio@beanon.com>
This commit is contained in:
@@ -18,10 +18,7 @@ export function createMathView(displayMode: boolean) {
|
||||
getPos: boolean | (() => number)
|
||||
): MathView => {
|
||||
// dynamically load katex styles and fonts
|
||||
import(
|
||||
/* webpackChunkName: "katex" */
|
||||
"katex/dist/katex.min.css"
|
||||
);
|
||||
import("katex/dist/katex.min.css");
|
||||
|
||||
const pluginState = MATH_PLUGIN_KEY.getState(view.state);
|
||||
if (!pluginState) {
|
||||
|
||||
@@ -57,10 +57,7 @@ function getNewState({
|
||||
return diagramWrapper;
|
||||
}
|
||||
|
||||
import(
|
||||
/* webpackChunkName: "mermaid" */
|
||||
"mermaid"
|
||||
).then((module) => {
|
||||
import("mermaid").then((module) => {
|
||||
module.default.initialize({
|
||||
startOnLoad: true,
|
||||
flowchart: {
|
||||
|
||||
Reference in New Issue
Block a user