Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit c5ca7a1

Browse files
committed
Fix loading rules
1 parent fdbcd42 commit c5ca7a1

File tree

3 files changed

+97
-2
lines changed

3 files changed

+97
-2
lines changed

nofs.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,32 @@ module.exports = function (context, options) {
33
name: "nofs-plugin",
44
configureWebpack(config, isServer, utils) {
55
return {
6+
module: {
7+
rules: [
8+
{
9+
test: /node_modules\/vfile\/core\.js/,
10+
use: [
11+
{
12+
loader: "imports-loader",
13+
options: {
14+
type: "commonjs",
15+
imports: ["single process/browser process"],
16+
},
17+
},
18+
],
19+
},
20+
],
21+
},
622
resolve: {
723
alias: {
824
path: require.resolve("path-browserify"),
25+
process: "process/browser",
926
},
1027
fallback: {
1128
fs: false,
1229
http: require.resolve("stream-http"),
1330
https: require.resolve("https-browserify"),
31+
process: false,
1432
},
1533
},
1634
};

package-lock.json

Lines changed: 76 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"classnames": "^2.3.1",
1616
"dedent": "github:timhall/dedent",
1717
"https-browserify": "^1.0.0",
18+
"imports-loader": "^2.0.0",
1819
"path-browserify": "^1.0.1",
1920
"prismjs": "^1.23.0",
2021
"react": "^16.14.0",
@@ -36,6 +37,7 @@
3637
]
3738
},
3839
"devDependencies": {
39-
"mustache": "^4.2.0"
40+
"mustache": "^4.2.0",
41+
"process": "0.11.10"
4042
}
4143
}

0 commit comments

Comments
 (0)