@umijs/plugin-docs 4.0.9 → 4.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/compiler.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // compiler.ts
22
+ // src/compiler.ts
23
23
  var compiler_exports = {};
24
24
  __export(compiler_exports, {
25
25
  compile: () => compile
@@ -85,6 +85,9 @@ function MDXContent(props = {}) {
85
85
  import_plugin_utils.logger.error(`Above error occurred in ${opts.fileName} at line ${e.line}`);
86
86
  import_plugin_utils.logger.error(opts.content.split("\n").filter((_, i) => i == e.line - 1).join("\n"));
87
87
  import_plugin_utils.logger.error(" ".repeat(e.column - 1) + "^");
88
+ if (process.env.NODE_ENV === "production") {
89
+ throw new Error("compile error");
90
+ }
88
91
  return { result: "" };
89
92
  }
90
93
  }
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // index.ts
39
+ // src/index.ts
40
40
  var src_exports = {};
41
41
  __export(src_exports, {
42
42
  default: () => src_default
@@ -152,6 +152,16 @@ export default () => {
152
152
  `
153
153
  });
154
154
  });
155
+ api.chainWebpack((memo) => {
156
+ if (api.env === "development") {
157
+ memo.plugin("fastRefresh").tap(([params]) => [
158
+ __spreadProps(__spreadValues({}, params), {
159
+ include: /\.([cm]js|[jt]sx?|flow|md)$/i
160
+ })
161
+ ]);
162
+ }
163
+ return memo;
164
+ });
155
165
  };
156
166
  function withTmpPath(opts) {
157
167
  return (0, import_path.join)(opts.api.paths.absTmpPath, opts.api.plugin.key && !opts.noPluginDir ? `plugin-${opts.api.plugin.key}` : "", opts.path);
package/dist/loader.js CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // loader.ts
19
+ // src/loader.ts
20
20
  var loader_exports = {};
21
21
  __export(loader_exports, {
22
22
  default: () => loader_default
package/dist/markdown.js CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // markdown.ts
19
+ // src/markdown.ts
20
20
  var markdown_exports = {};
21
21
  __export(markdown_exports, {
22
22
  parseTitle: () => parseTitle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugin-docs",
3
- "version": "4.0.9",
3
+ "version": "4.0.12",
4
4
  "description": "@umijs/plugin-docs",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/plugin-docs#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -42,7 +42,7 @@
42
42
  "rehype-slug": "5.0.1",
43
43
  "remark-gfm": "^3.0.1",
44
44
  "tailwindcss": "^3.0.24",
45
- "umi": "4.0.9"
45
+ "umi": "4.0.12"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"