dumi 2.3.3 → 2.4.0-alpha.1

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.
@@ -29,15 +29,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/features/compile/index.ts
30
30
  var compile_exports = {};
31
31
  __export(compile_exports, {
32
- default: () => compile_default
32
+ default: () => compile_default,
33
+ techStacks: () => techStacks
33
34
  });
34
35
  module.exports = __toCommonJS(compile_exports);
35
36
  var import_react = __toESM(require("../../techStacks/react"));
36
37
  var import_utils = require("../../utils");
37
38
  var import_path = __toESM(require("path"));
38
39
  var import_assets = require("../assets");
40
+ var import_makoHooks = require("./makoHooks");
41
+ var techStacks = [];
39
42
  var compile_default = (api) => {
40
- const techStacks = [];
41
43
  api.describe({ key: "dumi:compile" });
42
44
  api.register({
43
45
  key: "registerTechStack",
@@ -83,8 +85,14 @@ var compile_default = (api) => {
83
85
  return acc;
84
86
  }, [])
85
87
  );
88
+ api.modifyConfig((memo) => {
89
+ memo.mfsu = false;
90
+ return memo;
91
+ });
86
92
  api.chainWebpack(async (memo) => {
87
93
  const babelInUmi = memo.module.rule("src").use("babel-loader").entries();
94
+ if (!babelInUmi)
95
+ return memo;
88
96
  const loaderPath = require.resolve("../../loaders/markdown");
89
97
  memo.resolve.byDependency.set("commonjs", {
90
98
  conditionNames: ["require", "node", "import"]
@@ -101,6 +109,7 @@ var compile_default = (api) => {
101
109
  pkg: api.pkg
102
110
  };
103
111
  const mdRule = memo.module.rule("dumi-md").type("javascript/auto").test(/\.md$/);
112
+ mdRule.oneOf("md-null").pre().resourceQuery(/watch=parent/).use("null-loader").loader(require.resolve("../../loaders/null")).end();
104
113
  ["frontmatter", "text", "demo-index"].forEach((type) => {
105
114
  mdRule.oneOf(`md-${type}`).resourceQuery(new RegExp(`${type}$`)).use(`md-${type}-loader`).loader(loaderPath).options({
106
115
  ...loaderBaseOpts,
@@ -142,4 +151,17 @@ var compile_default = (api) => {
142
151
  }
143
152
  return memo;
144
153
  });
154
+ api.modifyConfig((memo) => {
155
+ if (memo.mako) {
156
+ console.log(memo.mako);
157
+ memo.mako.hooks = {
158
+ load: (0, import_makoHooks.getLoadHook)(api)
159
+ };
160
+ }
161
+ return memo;
162
+ });
145
163
  };
164
+ // Annotate the CommonJS export names for ESM import in node:
165
+ 0 && (module.exports = {
166
+ techStacks
167
+ });
@@ -0,0 +1,8 @@
1
+ import type { IApi } from "../../types";
2
+ export declare const getLoadHook: (api: IApi) => (filePath: string) => Promise<{
3
+ content: Buffer | null;
4
+ type: "css" | "js" | "jsx";
5
+ } | {
6
+ content: string;
7
+ type: string;
8
+ } | undefined>;
@@ -0,0 +1,155 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/features/compile/makoHooks.ts
30
+ var makoHooks_exports = {};
31
+ __export(makoHooks_exports, {
32
+ getLoadHook: () => getLoadHook
33
+ });
34
+ module.exports = __toCommonJS(makoHooks_exports);
35
+ var import_fs = __toESM(require("fs"));
36
+ var import_querystring = __toESM(require("querystring"));
37
+ var import_url = __toESM(require("url"));
38
+ var import__ = require(".");
39
+ var import_utils = require("../../utils");
40
+ var import_assets = require("../assets");
41
+ var modeMap = {
42
+ "demo-index": "demo-index",
43
+ frontmatter: "frontmatter",
44
+ text: "text",
45
+ demo: "demo"
46
+ };
47
+ var customRunLoaders = async (options) => {
48
+ const result = await (0, import_utils.runLoaders)(options);
49
+ return {
50
+ content: result.result[0],
51
+ type: options.type ?? "jsx"
52
+ };
53
+ };
54
+ var mdLoaderPath = require.resolve("../../loaders/markdown");
55
+ var getLoadHook = (api) => {
56
+ return async (filePath) => {
57
+ var _a, _b, _c, _d;
58
+ const loaderBaseOpts = {
59
+ techStacks: import__.techStacks,
60
+ cwd: api.cwd,
61
+ alias: api.config.alias,
62
+ resolve: api.config.resolve,
63
+ extraRemarkPlugins: api.config.extraRemarkPlugins,
64
+ extraRehypePlugins: api.config.extraRehypePlugins,
65
+ routes: api.appData.routes,
66
+ locales: api.config.locales || [],
67
+ pkg: api.pkg
68
+ };
69
+ const requestUrl = import_url.default.parse(filePath);
70
+ const query = import_querystring.default.parse(requestUrl.query);
71
+ if ((_a = requestUrl.query) == null ? void 0 : _a.includes("watch=parent")) {
72
+ return {
73
+ content: "",
74
+ type: "js"
75
+ };
76
+ }
77
+ if (/\..+$/.test(filePath)) {
78
+ if ((_b = requestUrl.query) == null ? void 0 : _b.includes("techStack")) {
79
+ return await customRunLoaders({
80
+ resource: filePath,
81
+ loaders: [
82
+ {
83
+ loader: require.resolve("../../loaders/demo"),
84
+ options: { techStacks: import__.techStacks, cwd: api.cwd }
85
+ }
86
+ ]
87
+ });
88
+ }
89
+ }
90
+ if (/\.(j|t)sx?\?type=frontmatter$/.test(filePath)) {
91
+ return await customRunLoaders({
92
+ resource: filePath,
93
+ loaders: [
94
+ {
95
+ loader: require.resolve("../../loaders/page"),
96
+ options: {}
97
+ }
98
+ ]
99
+ });
100
+ }
101
+ if ((_c = requestUrl.pathname) == null ? void 0 : _c.endsWith(".md")) {
102
+ let options;
103
+ const builtins = api.service.themeData.builtins;
104
+ const baseOptions = { ...loaderBaseOpts };
105
+ const resolveOptions = (queryType) => {
106
+ if (queryType in modeMap) {
107
+ return { ...baseOptions, mode: modeMap[queryType] };
108
+ }
109
+ const additionalOpts = api.isPluginEnable("assets") || api.isPluginEnable("exportStatic") ? {
110
+ builtins,
111
+ onResolveDemos(demos) {
112
+ const assets = demos.reduce(
113
+ (acc, demo) => "asset" in demo ? [...acc, demo.asset] : acc,
114
+ []
115
+ );
116
+ (0, import_assets.addExampleAssets)(assets);
117
+ },
118
+ onResolveAtomMeta: import_assets.addAtomMeta
119
+ } : { builtins };
120
+ return { ...baseOptions, ...additionalOpts };
121
+ };
122
+ options = resolveOptions(query.type);
123
+ return await customRunLoaders({
124
+ resource: filePath,
125
+ loaders: [
126
+ {
127
+ loader: mdLoaderPath,
128
+ options
129
+ }
130
+ ],
131
+ context: {},
132
+ readResource: import_fs.default.readFile.bind(import_fs.default)
133
+ });
134
+ }
135
+ if ((_d = requestUrl.query) == null ? void 0 : _d.includes("dumi-raw")) {
136
+ return await customRunLoaders({
137
+ resource: filePath,
138
+ loaders: [
139
+ {
140
+ loader: require.resolve("raw-loader"),
141
+ options: {}
142
+ },
143
+ {
144
+ loader: require.resolve("../../loaders/pre-raw"),
145
+ options: {}
146
+ }
147
+ ]
148
+ });
149
+ }
150
+ };
151
+ };
152
+ // Annotate the CommonJS export names for ESM import in node:
153
+ 0 && (module.exports = {
154
+ getLoadHook
155
+ });
@@ -38,8 +38,8 @@ var html2sketch_default = (api) => {
38
38
  path: "msgExecutor.ts",
39
39
  content: `import { getSketchJSON } from '.';
40
40
 
41
- window.addEventListener('message', (ev) => {
42
- if (ev.data.type === 'dumi.html2sketch.exec') {
41
+ typeof window !== 'undefined' && window.addEventListener('message', (ev) => {
42
+ if (ev.data.type === 'dumi.html2sketch.exec') {
43
43
  const { value: opts, token } = ev.data;
44
44
 
45
45
  getSketchJSON(document, opts).then((value) => {
@@ -162,7 +162,7 @@ var theme_default = (api) => {
162
162
  return memo;
163
163
  });
164
164
  api.modifyConfig((memo) => {
165
- var _a, _b, _c;
165
+ var _a, _b, _c, _d;
166
166
  if (localThemeData) {
167
167
  themeMapKeys.forEach((key) => {
168
168
  Object.values(localThemeData[key] || {}).forEach((item) => {
@@ -215,22 +215,16 @@ var theme_default = (api) => {
215
215
  }
216
216
  }
217
217
  }
218
- return memo;
219
- });
220
- api.chainWebpack((memo) => {
221
- const lessRule = memo.module.rule("less");
222
- ["css", "css-modules"].forEach((rule) => {
223
- Object.values(lessRule.oneOf(rule).uses.entries()).forEach((loader) => {
224
- if (loader.get("loader").includes("less-loader")) {
225
- loader.tap((opts) => {
226
- var _a;
227
- (_a = opts.lessOptions).modifyVars ?? (_a.modifyVars = {});
228
- opts.lessOptions.modifyVars["dark-selector"] = `~'[${import_constants.PREFERS_COLOR_ATTR}="dark"]'`;
229
- return opts;
230
- });
231
- }
232
- });
233
- });
218
+ if (memo.theme) {
219
+ memo.theme["dark-selector"] = `~'[${import_constants.PREFERS_COLOR_ATTR}="dark"]'`;
220
+ } else if (memo.lessLoader) {
221
+ (_d = memo.lessLoader.lessOptions).modifyVars ?? (_d.modifyVars = {});
222
+ memo.lessLoader.lessOptions.modifyVars["dark-selector"] = `~'[${import_constants.PREFERS_COLOR_ATTR}="dark"]'`;
223
+ } else {
224
+ memo.theme = {
225
+ "dark-selector": `~'[${import_constants.PREFERS_COLOR_ATTR}="dark"]'`
226
+ };
227
+ }
234
228
  return memo;
235
229
  });
236
230
  api.onGenerateFiles({
@@ -392,6 +386,8 @@ export default DumiLoading;
392
386
  });
393
387
  api.addEntryCodeAhead(() => {
394
388
  const { prefersColor } = api.config.themeConfig;
389
+ if (typeof window === "undefined")
390
+ return "";
395
391
  if (prefersColor.switch === false && prefersColor.default !== "auto") {
396
392
  return `document.documentElement.setAttribute('${import_constants.PREFERS_COLOR_ATTR}', '${prefersColor.default}');`;
397
393
  }
@@ -22,14 +22,17 @@ __export(demo_exports, {
22
22
  default: () => demoLoader
23
23
  });
24
24
  module.exports = __toCommonJS(demo_exports);
25
+ var import_utils = require("@umijs/utils");
25
26
  function demoLoader(raw) {
26
27
  const opts = this.getOptions();
27
28
  const techStackName = new URLSearchParams(this.resourceQuery).get(
28
29
  "techStack"
29
30
  );
30
31
  const techStack = opts.techStacks.find((t) => t.name === techStackName);
31
- return techStack.transformCode(raw, {
32
+ let code = techStack.transformCode(raw, {
32
33
  type: "external",
33
34
  fileAbsPath: this.resourcePath
34
35
  });
36
+ code = code + `import '${(0, import_utils.winPath)(this.resourcePath)}?watch=parent';`;
37
+ return code;
35
38
  }
@@ -59,7 +59,15 @@ function emitDefault(opts, ret) {
59
59
  if (frontmatter.atomId && opts.onResolveAtomMeta) {
60
60
  opts.onResolveAtomMeta(frontmatter.atomId, frontmatter);
61
61
  }
62
+ const dependencies = this.getDependencies().slice(1).filter((filePath) => {
63
+ return !filePath.includes("node_modules");
64
+ });
62
65
  return `${Object.values(opts.builtins).map((item) => `import ${item.specifier} from '${item.source}';`).join("\n")}
66
+ ${dependencies.filter((dep) => dep.endsWith(".md")).map(
67
+ (md) => `
68
+ import '${(0, import_plugin_utils.winPath)(md)}?watch=parent';
69
+ `
70
+ ).join("\n")}
63
71
  import LoadingComponent from '@@/dumi/theme/loading';
64
72
  import React, { Suspense } from 'react';
65
73
  import { DumiPage, useTabMeta, useRouteMeta } from 'dumi';
@@ -83,7 +91,7 @@ function emitDemo(opts, ret) {
83
91
  const { demos } = ret.meta;
84
92
  return import_plugin_utils.Mustache.render(
85
93
  `import React from 'react';
86
-
94
+ import '${(0, import_plugin_utils.winPath)(this.getDependencies()[0])}?watch=parent';
87
95
  export const demos = {
88
96
  {{#demos}}
89
97
  '{{{id}}}': {
@@ -107,7 +115,7 @@ export const demos = {
107
115
  var _a;
108
116
  if (((_a = asset.dependencies[file]) == null ? void 0 : _a.type) === "FILE") {
109
117
  asset = import_plugin_utils.lodash.cloneDeep(asset);
110
- asset.dependencies[file].value = `{{{require('-!${resolveMap[file]}?dumi-raw').default}}}`;
118
+ asset.dependencies[file].value = `{{{require('${resolveMap[file]}?dumi-raw').default}}}`;
111
119
  }
112
120
  });
113
121
  return JSON.stringify(asset, null, 2).replace(/"{{{|}}}"/g, "");
@@ -166,7 +174,9 @@ export const demos = {
166
174
  function emitDemoIndex(opts, ret) {
167
175
  const { demos } = ret.meta;
168
176
  return import_plugin_utils.Mustache.render(
169
- `export const demoIndex = {
177
+ `
178
+ import '${(0, import_plugin_utils.winPath)(this.getDependencies()[0])}?watch=parent';
179
+ export const demoIndex = {
170
180
  ids: {{{ids}}},
171
181
  getter: {{{getter}}}
172
182
  };`,
@@ -183,7 +193,9 @@ function emitDemoIndex(opts, ret) {
183
193
  function emitFrontmatter(opts, ret) {
184
194
  const { frontmatter, toc } = ret.meta;
185
195
  return import_plugin_utils.Mustache.render(
186
- `export const toc = {{{toc}}};
196
+ `
197
+ import '${(0, import_plugin_utils.winPath)(this.getDependencies()[0])}?watch=parent';
198
+ export const toc = {{{toc}}};
187
199
  export const frontmatter = {{{frontmatter}}};`,
188
200
  {
189
201
  toc: JSON.stringify(toc),
@@ -193,9 +205,15 @@ export const frontmatter = {{{frontmatter}}};`,
193
205
  }
194
206
  function emitText(opts, ret) {
195
207
  const { texts } = ret.meta;
196
- return import_plugin_utils.Mustache.render(`export const texts = {{{texts}}};`, {
197
- texts: JSON.stringify(texts)
198
- });
208
+ return import_plugin_utils.Mustache.render(
209
+ `
210
+ import '${(0, import_plugin_utils.winPath)(this.getDependencies()[0])}?watch=parent';
211
+ export const texts = {{{texts}}};
212
+ `,
213
+ {
214
+ texts: JSON.stringify(texts)
215
+ }
216
+ );
199
217
  }
200
218
  function emit(opts, ret) {
201
219
  const { demos, embeds } = ret.meta;
@@ -0,0 +1,2 @@
1
+ export default function loader(): string;
2
+ export declare function pitch(): string;
@@ -0,0 +1,35 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/loaders/null/index.ts
20
+ var null_exports = {};
21
+ __export(null_exports, {
22
+ default: () => loader,
23
+ pitch: () => pitch
24
+ });
25
+ module.exports = __toCommonJS(null_exports);
26
+ function loader() {
27
+ return "";
28
+ }
29
+ function pitch() {
30
+ return "";
31
+ }
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ pitch
35
+ });
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,9 @@
1
+ /// <reference types="node" />
1
2
  import type { Range, RangeOptions } from '@umijs/utils/compiled/semver';
2
3
  import Cache from 'file-system-cache';
4
+ import type { RunLoaderOption as InternalRunLoaderOption, RunLoaderResult } from '../compiled/loader-runner';
5
+ export type * from '../compiled/loader-runner';
6
+ export { getContext } from '../compiled/loader-runner';
3
7
  /**
4
8
  * get route path from file-system path
5
9
  */
@@ -48,8 +52,11 @@ export declare function generateMetaChunkName(path: string, cwd: string, locales
48
52
  * generate hash for string
49
53
  */
50
54
  export declare function getContentHash(content: string, length?: number): string;
55
+ export type RunLoaderOption = Partial<InternalRunLoaderOption>;
56
+ export declare function runLoaders(options: RunLoaderOption): Promise<RunLoaderResult>;
57
+ export declare function runLoaders(options: RunLoaderOption, callback: undefined): Promise<RunLoaderResult>;
58
+ export declare function runLoaders(options: RunLoaderOption, callback: (err: NodeJS.ErrnoException | null, result: RunLoaderResult) => any): void;
51
59
  /**
52
60
  * check if version is in range
53
61
  */
54
62
  export declare function isVersionInRange(version: string, range: string | Range, options?: RangeOptions): boolean;
55
- export {};
package/dist/utils.js CHANGED
@@ -34,12 +34,14 @@ __export(utils_exports, {
34
34
  generateMetaChunkName: () => generateMetaChunkName,
35
35
  getCache: () => getCache,
36
36
  getContentHash: () => getContentHash,
37
+ getContext: () => import_loader_runner2.getContext,
37
38
  getFileContentByRegExp: () => getFileContentByRegExp,
38
39
  getFileIdFromFsPath: () => getFileIdFromFsPath,
39
40
  getFileRangeLines: () => getFileRangeLines,
40
41
  getProjectRoot: () => getProjectRoot,
41
42
  isVersionInRange: () => isVersionInRange,
42
43
  parseCodeFrontmatter: () => parseCodeFrontmatter,
44
+ runLoaders: () => runLoaders,
43
45
  tryFatherBuildConfigs: () => tryFatherBuildConfigs
44
46
  });
45
47
  module.exports = __toCommonJS(utils_exports);
@@ -49,7 +51,10 @@ var import_fs = __toESM(require("fs"));
49
51
  var import_js_yaml = __toESM(require("js-yaml"));
50
52
  var import_path = __toESM(require("path"));
51
53
  var import_plugin_utils = require("umi/plugin-utils");
54
+ var import_util = require("util");
55
+ var import_loader_runner = require("../compiled/loader-runner");
52
56
  var import_constants = require("./constants");
57
+ var import_loader_runner2 = require("../compiled/loader-runner");
53
58
  function getFileIdFromFsPath(fsPath) {
54
59
  return import_plugin_utils.lodash.kebabCase((0, import_plugin_utils.winPath)(fsPath).replace(/((\/|^)index)?\.\w+$/g, ""));
55
60
  }
@@ -160,6 +165,13 @@ function generateMetaChunkName(path2, cwd, locales = []) {
160
165
  function getContentHash(content2, length = 8) {
161
166
  return (0, import_crypto.createHash)("md5").update(content2).digest("hex").slice(0, length);
162
167
  }
168
+ var promisifyRunLoaders = (0, import_util.promisify)(import_loader_runner.runLoaders);
169
+ function runLoaders(options, callback) {
170
+ if (callback !== void 0) {
171
+ return (0, import_loader_runner.runLoaders)(options, callback);
172
+ }
173
+ return promisifyRunLoaders(options);
174
+ }
163
175
  function isVersionInRange(version, range, options = { includePrerelease: true }) {
164
176
  if (import_plugin_utils.semver.valid(version)) {
165
177
  return import_plugin_utils.semver.satisfies(version, range, options);
@@ -176,11 +188,13 @@ function isVersionInRange(version, range, options = { includePrerelease: true })
176
188
  generateMetaChunkName,
177
189
  getCache,
178
190
  getContentHash,
191
+ getContext,
179
192
  getFileContentByRegExp,
180
193
  getFileIdFromFsPath,
181
194
  getFileRangeLines,
182
195
  getProjectRoot,
183
196
  isVersionInRange,
184
197
  parseCodeFrontmatter,
198
+ runLoaders,
185
199
  tryFatherBuildConfigs
186
200
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi",
3
- "version": "2.3.3",
3
+ "version": "2.4.0-alpha.1",
4
4
  "description": "📖 Documentation Generator of React Component",
5
5
  "keywords": [
6
6
  "generator",
@@ -65,9 +65,9 @@
65
65
  "@swc/core": "1.4.2",
66
66
  "@types/hast": "^2.3.5",
67
67
  "@types/mdast": "^3.0.12",
68
- "@umijs/bundler-utils": "^4.0.84",
69
- "@umijs/core": "^4.0.84",
70
- "@umijs/utils": "^4.0.84",
68
+ "@umijs/bundler-utils": "4.2.6-alpha.4",
69
+ "@umijs/core": "4.2.6-alpha.4",
70
+ "@umijs/utils": "4.2.6-alpha.4",
71
71
  "animated-scroll-to": "^2.3.0",
72
72
  "classnames": "2.3.2",
73
73
  "codesandbox": "^2.2.3",
@@ -119,7 +119,7 @@
119
119
  "sass": "^1.64.1",
120
120
  "sitemap": "^7.1.1",
121
121
  "sucrase": "^3.34.0",
122
- "umi": "^4.0.84",
122
+ "umi": "4.2.6-alpha.4",
123
123
  "unified": "^10.1.2",
124
124
  "unist-util-visit": "^4.1.2",
125
125
  "unist-util-visit-parents": "^5.1.3",
@@ -142,7 +142,7 @@
142
142
  "@types/react": "^18.2.17",
143
143
  "@types/react-copy-to-clipboard": "^5.0.4",
144
144
  "@types/react-dom": "^18.2.7",
145
- "@umijs/lint": "^4.0.84",
145
+ "@umijs/lint": "4.2.6-alpha.4",
146
146
  "@umijs/plugins": "4.0.32",
147
147
  "codesandbox-import-utils": "^2.2.3",
148
148
  "eslint": "^8.46.0",
@@ -1,5 +1,5 @@
1
1
  import { type FC, type ReactNode } from 'react';
2
- import './heti.scss';
2
+ import '../../styles/heti.less';
3
3
  import './index.less';
4
4
  declare const Content: FC<{
5
5
  children: ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { useRouteMeta, useSidebarData, useSiteData } from 'dumi';
2
2
  import React from 'react';
3
- import "./heti.scss";
3
+ import "../../styles/heti.less";
4
4
  import "./index.less";
5
5
  var Content = function Content(props) {
6
6
  var sidebar = useSidebarData();