@umijs/preset-vue 4.0.8 → 4.0.9
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.
|
@@ -26,20 +26,15 @@ async function addAssetRules({ config, api }) {
|
|
|
26
26
|
config.module.rules.delete("asset");
|
|
27
27
|
const { userConfig } = api;
|
|
28
28
|
const inlineLimit = parseInt(userConfig.inlineLimit || "10000", 10);
|
|
29
|
-
const staticPathPrefix = api.config.staticPathPrefix !== void 0 ? api.config.staticPathPrefix : "static/";
|
|
30
29
|
config.module.rule("avif").test(/\.avif$/).type("asset").mimetype("image/avif").parser({
|
|
31
30
|
dataUrlCondition: {
|
|
32
31
|
maxSize: inlineLimit
|
|
33
32
|
}
|
|
34
|
-
}).generator({
|
|
35
|
-
filename: `${staticPathPrefix}[name].[hash:8].[ext]`
|
|
36
33
|
});
|
|
37
|
-
config.module.rule("image").test(/\.(bmp|gif|jpg|jpeg|png)$/).type("asset").parser({
|
|
34
|
+
config.module.rule("image").test(/\.(bmp|gif|jpg|jpeg|png|svg)$/).type("asset").parser({
|
|
38
35
|
dataUrlCondition: {
|
|
39
36
|
maxSize: inlineLimit
|
|
40
37
|
}
|
|
41
|
-
}).generator({
|
|
42
|
-
filename: `${staticPathPrefix}[name].[hash:8].[ext]`
|
|
43
38
|
});
|
|
44
39
|
}
|
|
45
40
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/features/default.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
// vueBabelLoaderCustomize.ts
|
|
20
|
+
var vueBabelLoaderCustomize_exports = {};
|
|
21
|
+
__export(vueBabelLoaderCustomize_exports, {
|
|
22
|
+
default: () => vueBabelLoaderCustomize
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(vueBabelLoaderCustomize_exports);
|
|
25
|
+
var import_querystring = require("querystring");
|
|
26
|
+
function vueBabelLoaderCustomize() {
|
|
27
|
+
return {
|
|
28
|
+
config(config) {
|
|
29
|
+
const context = this;
|
|
30
|
+
if (config.options.filename) {
|
|
31
|
+
if (/\.vue$/.test(config.options.filename)) {
|
|
32
|
+
const query = (0, import_querystring.parse)(context.resourceQuery.slice(1));
|
|
33
|
+
if (query.type === "template") {
|
|
34
|
+
config.options.filename = `${config.options.filename}?type=${query.type}`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return config.options;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/preset-vue",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.9",
|
|
4
4
|
"description": "@umijs/preset-vue",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/preset-vue#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
"compiled"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "
|
|
20
|
+
"build": "umi-scripts father build",
|
|
21
21
|
"build:deps": "umi-scripts bundleDeps",
|
|
22
|
-
"dev": "
|
|
22
|
+
"dev": "umi-scripts father dev"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@umijs/renderer-vue": "4.0.
|
|
25
|
+
"@umijs/renderer-vue": "4.0.9",
|
|
26
26
|
"vue": "3.2.36",
|
|
27
27
|
"vue-loader": "17.0.0",
|
|
28
28
|
"vue-router": "4.0.15"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@vitejs/plugin-vue": "2.3.1",
|
|
32
|
-
"umi": "4.0.
|
|
32
|
+
"umi": "4.0.9"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|