fix: react-markdown process is not defined (#3)

This commit is contained in:
yehong 2023-08-17 02:49:32 +08:00 committed by GitHub
parent cae1734b72
commit 1b1dd80838
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 14 additions and 0 deletions

View File

@ -23,6 +23,8 @@ import Zmage from "react-zmage";
import i18next from "i18next";
import * as Conf from "../Conf";
window.process = {cwd: () => ""};
class AdminTopic extends React.Component {
constructor(props) {
super(props);

View File

@ -20,6 +20,7 @@ import "./NoMatch.css";
import i18next from "i18next";
import {Helmet} from "react-helmet";
import ReactMarkdown from "react-markdown";
window.process = {cwd: () => ""};
class NoMatch extends React.Component {
constructor(props) {

View File

@ -21,6 +21,7 @@ import i18next from "i18next";
const ReactMarkdown = require("react-markdown");
const pangu = require("pangu");
window.process = {cwd: () => ""};
class LatestReplyBox extends React.Component {
constructor(props) {

View File

@ -33,6 +33,7 @@ import {Helmet} from "react-helmet";
require("codemirror/mode/markdown/markdown");
const ReactMarkdown = require("react-markdown");
window.process = {cwd: () => ""};
class NewBox extends React.Component {
constructor(props) {

View File

@ -32,6 +32,7 @@ import * as Conf from "../Conf";
require("codemirror/mode/markdown/markdown");
const ReactMarkdown = require("react-markdown");
window.process = {cwd: () => ""};
class NewNodeTopicBox extends React.Component {
constructor(props) {

View File

@ -27,6 +27,8 @@ import i18next from "i18next";
import * as Conf from "../Conf";
import {Helmet} from "react-helmet";
window.process = {cwd: () => ""};
class NodeBox extends React.Component {
constructor(props) {
super(props);

View File

@ -25,6 +25,7 @@ import i18next from "i18next";
import {Helmet} from "react-helmet";
const pangu = require("pangu");
window.process = {cwd: () => ""};
class NotificationBox extends React.Component {
constructor(props) {

View File

@ -28,6 +28,7 @@ import UserLink from "../UserLink";
// const pangu = require("pangu");
const maxReplyDepth = Setting.PcBrowser ? Conf.ReplyMaxDepth : Conf.ReplyMobileMaxDepth;
window.process = {cwd: () => ""};
class ReplyBox extends React.Component {
constructor(props) {

View File

@ -23,6 +23,8 @@ import UserLink from "../UserLink";
import {Helmet} from "react-helmet";
import Zmage from "react-zmage";
window.process = {cwd: () => ""};
class SingleReplyBox extends React.Component {
constructor(props) {
super(props);

View File

@ -35,6 +35,8 @@ require("codemirror/mode/markdown/markdown");
const ReactMarkdown = require("react-markdown");
const pangu = require("pangu");
window.process = {cwd: () => ""};
class TopicBox extends React.Component {
constructor(props) {
super(props);