Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix webpack 5 config for live demo #504

Merged
merged 6 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ Currently, all the plugins provided only work for remark versions **lesser than*

This project uses [Jest][jest] for testing. It is recommended to use the locally installed version using `npx`, and run Jest in watch mode when developing `npx jest --watch --notify` (`--notify` sends desktop notifications when tests run).

### Development

1. `npm run build-demo`
1. Open `packages/zmarkdown/public/index.html` in your browser
StaloneLab marked this conversation as resolved.
Show resolved Hide resolved

### Useful commands

* `npm run test` : tests all packages.
Expand Down
1 change: 1 addition & 0 deletions packages/zmarkdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"katex": "0.11.1",
"md-attr-parser": "^1.3.0",
"pm2": "^4.4.1",
"process": "^0.11.10",
"rebber": "file:../rebber",
"rebber-plugins": "file:../rebber-plugins",
"rehype-autolink-headings": "^4.0.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/zmarkdown/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const webpack = require('webpack');

Check failure on line 1 in packages/zmarkdown/webpack.config.js

View workflow job for this annotation

GitHub Actions / Check linting problems

Extra semicolon
StaloneLab marked this conversation as resolved.
Show resolved Hide resolved
const path = require('path')

const mode = process.env.NODE_ENV ? process.env.NODE_ENV : 'production'
Expand All @@ -22,6 +23,11 @@
},
],
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
}),
],
}

const makeExportObject = (type) => {
Expand Down
Loading