Skip to content

Commit

Permalink
meta: fix webpack 5 config for live demo (#504)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Lefoulon <vincent.lefoulon@laetis.fr>
  • Loading branch information
Vayel and Vincent Lefoulon authored Dec 31, 2023
1 parent 7bd69e6 commit 06a8bc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/zmarkdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"watch": "jest --watch",
"server": "pm2 start -f server/index.js -i 3 --max-memory-restart 150M",
"stop": "pm2 kill",
"watch:client": "cross-env NODE_ENV=development webpack --watch --info-verbosity=verbose",
"watch:client": "cross-env NODE_ENV=development webpack --watch",
"release": "webpack"
},
"engines": {
Expand All @@ -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')
const path = require('path')

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

const makeExportObject = (type) => {
Expand Down

0 comments on commit 06a8bc7

Please sign in to comment.