dumi 2.1.23 → 2.1.24

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.
@@ -1,4 +1,4 @@
1
- import { useEffect } from 'react';
1
+ import { useLayoutEffect } from 'react';
2
2
  import type { ILocale, INav, INavItem, IRouteMeta, IRoutesById, IUserNavValue } from './types';
3
3
  export declare const useLocaleDocRoutes: () => IRoutesById;
4
4
  /**
@@ -7,7 +7,7 @@ export declare const useLocaleDocRoutes: () => IRoutesById;
7
7
  * @returns code string
8
8
  */
9
9
  export declare const genReactRenderCode: (version: string) => string;
10
- export declare const useIsomorphicLayoutEffect: typeof useEffect;
10
+ export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
11
11
  /**
12
12
  * common comparer for sidebar/nav items
13
13
  */
@@ -168,7 +168,7 @@ var theme_default = (api) => {
168
168
  content: `import React, { useState, useEffect, useRef } from 'react';
169
169
  import { useOutlet, history } from 'dumi';
170
170
  ${enableNProgress ? `
171
- import nprogress from 'nprogress';
171
+ import nprogress from '${(0, import_plugin_utils.winPath)(import_path.default.dirname(require.resolve("nprogress/package")))}';
172
172
  import './nprogress.css';
173
173
  ` : ""}
174
174
  import { SiteContext } from '${(0, import_plugin_utils.winPath)(require.resolve("../../client/theme-api/context"))}';
@@ -107,7 +107,6 @@ var depsMapping = {};
107
107
  function mdLoader(content) {
108
108
  const opts = this.getOptions();
109
109
  const cb = this.async();
110
- this.cacheable(false);
111
110
  const cache = (0, import_utils.getCache)("md-loader");
112
111
  const baseCacheKey = [
113
112
  this.resourcePath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi",
3
- "version": "2.1.23",
3
+ "version": "2.1.24",
4
4
  "description": "📖 Documentation Generator of React Component",
5
5
  "keywords": [
6
6
  "generator",