@umijs/preset-umi 4.6.53 → 4.6.54
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/features/ssr/builder/assets-loader.js +1 -1
- package/dist/features/ssr/builder/css-loader.d.ts +1 -2
- package/dist/features/ssr/builder/css-loader.js +1 -1
- package/dist/features/ssr/builder/less-loader.js +1 -1
- package/dist/features/ssr/utoopack/utoopack.js +2 -1
- package/package.json +15 -15
|
@@ -48,7 +48,7 @@ function assetsLoader(opts) {
|
|
|
48
48
|
);
|
|
49
49
|
if ((0, import_fs.existsSync)(args.path) && (0, import_fs.statSync)(args.path).isFile() && (0, import_fs.statSync)(args.path).size < 1e4) {
|
|
50
50
|
return {
|
|
51
|
-
contents: (0, import_fs.readFileSync)(args.path),
|
|
51
|
+
contents: new Uint8Array((0, import_fs.readFileSync)(args.path)),
|
|
52
52
|
loader: "dataurl"
|
|
53
53
|
};
|
|
54
54
|
} else {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import esbuild from '@umijs/bundler-utils/compiled/esbuild';
|
|
3
2
|
export declare function ensureLastSlash(path: string): string;
|
|
4
3
|
export declare function hashString(str: string): string;
|
|
5
|
-
export declare function getClassNames(code:
|
|
4
|
+
export declare function getClassNames(code: Uint8Array, filename: string): string[];
|
|
6
5
|
export declare function cssLoader(opts: {
|
|
7
6
|
cwd: string;
|
|
8
7
|
}): esbuild.Plugin;
|
|
@@ -55,7 +55,7 @@ function cssLoader(opts) {
|
|
|
55
55
|
name: "css-loader",
|
|
56
56
|
setup(build) {
|
|
57
57
|
build.onLoad({ filter: /\.css$/ }, (args) => {
|
|
58
|
-
const code = (0, import_fs.readFileSync)(args.path);
|
|
58
|
+
const code = new Uint8Array((0, import_fs.readFileSync)(args.path));
|
|
59
59
|
const filename = (0, import_utils.winPath)(args.path).replace(
|
|
60
60
|
ensureLastSlash((0, import_utils.winPath)(opts.cwd)),
|
|
61
61
|
""
|
|
@@ -67,7 +67,7 @@ var lessLoader = (opts) => {
|
|
|
67
67
|
paths: [...lessOptions.paths || [], dir]
|
|
68
68
|
});
|
|
69
69
|
const classNames = (0, import_css_loader.getClassNames)(
|
|
70
|
-
Buffer.from(result.css),
|
|
70
|
+
new Uint8Array(Buffer.from(result.css)),
|
|
71
71
|
filename
|
|
72
72
|
).sort();
|
|
73
73
|
const cssModuleObject = classNames.reduce(
|
|
@@ -88,7 +88,8 @@ var build = async (api, opts) => {
|
|
|
88
88
|
},
|
|
89
89
|
config: api.config,
|
|
90
90
|
serverBuildPath: absOutputFile,
|
|
91
|
-
useHash
|
|
91
|
+
useHash,
|
|
92
|
+
isDev: api.env === import_types.Env.development
|
|
92
93
|
});
|
|
93
94
|
const serverFile = getServerBuildFile(stats) || (0, import_path.basename)(absOutputFile);
|
|
94
95
|
const jsonFilePath = (0, import_path.join)((0, import_path.dirname)(absOutputFile), "build-manifest.json");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/preset-umi",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.54",
|
|
4
4
|
"description": "@umijs/preset-umi",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/preset-umi#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -43,21 +43,21 @@
|
|
|
43
43
|
"react-router": "6.3.0",
|
|
44
44
|
"react-router-dom": "6.3.0",
|
|
45
45
|
"regenerator-runtime": "0.13.11",
|
|
46
|
-
"@umijs/ast": "4.6.
|
|
47
|
-
"@umijs/babel-preset-umi": "4.6.
|
|
48
|
-
"@umijs/bundler-esbuild": "4.6.
|
|
49
|
-
"@umijs/bundler-
|
|
50
|
-
"@umijs/bundler-
|
|
51
|
-
"@umijs/bundler-
|
|
52
|
-
"@umijs/
|
|
53
|
-
"@umijs/
|
|
54
|
-
"@umijs/
|
|
55
|
-
"@umijs/
|
|
56
|
-
"@umijs/
|
|
57
|
-
"@umijs/plugin-run": "4.6.53",
|
|
58
|
-
"@umijs/server": "4.6.53",
|
|
46
|
+
"@umijs/ast": "4.6.54",
|
|
47
|
+
"@umijs/babel-preset-umi": "4.6.54",
|
|
48
|
+
"@umijs/bundler-esbuild": "4.6.54",
|
|
49
|
+
"@umijs/bundler-utoopack": "4.6.54",
|
|
50
|
+
"@umijs/bundler-vite": "4.6.54",
|
|
51
|
+
"@umijs/bundler-webpack": "4.6.54",
|
|
52
|
+
"@umijs/core": "4.6.54",
|
|
53
|
+
"@umijs/mfsu": "4.6.54",
|
|
54
|
+
"@umijs/plugin-run": "4.6.54",
|
|
55
|
+
"@umijs/server": "4.6.54",
|
|
56
|
+
"@umijs/renderer-react": "4.6.54",
|
|
59
57
|
"@umijs/ui": "3.0.1",
|
|
60
|
-
"@umijs/
|
|
58
|
+
"@umijs/utils": "4.6.54",
|
|
59
|
+
"@umijs/zod2ts": "4.6.54",
|
|
60
|
+
"@umijs/bundler-utils": "4.6.54"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@manypkg/get-packages": "1.1.3",
|