@vizejs/unplugin 0.83.0 → 0.85.0
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/esbuild.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as vizeUnplugin } from "./unplugin-
|
|
1
|
+
import { t as vizeUnplugin } from "./unplugin-D3PLQ0x8.mjs";
|
|
2
2
|
export { vizeUnplugin as default, vizeUnplugin };
|
package/dist/rollup.mjs
CHANGED
|
@@ -9,11 +9,18 @@ function createFilter(include, exclude) {
|
|
|
9
9
|
const includePatterns = include ? Array.isArray(include) ? include : [include] : [/\.vue$/];
|
|
10
10
|
const excludePatterns = exclude ? Array.isArray(exclude) ? exclude : [exclude] : [/node_modules/];
|
|
11
11
|
return (id) => {
|
|
12
|
-
const matchInclude = includePatterns.some((pattern) =>
|
|
13
|
-
const matchExclude = excludePatterns.some((pattern) =>
|
|
12
|
+
const matchInclude = includePatterns.some((pattern) => matchesPattern(pattern, id));
|
|
13
|
+
const matchExclude = excludePatterns.some((pattern) => matchesPattern(pattern, id));
|
|
14
14
|
return matchInclude && !matchExclude;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
+
function matchesPattern(pattern, id) {
|
|
18
|
+
if (typeof pattern === "string") return id.includes(pattern);
|
|
19
|
+
pattern.lastIndex = 0;
|
|
20
|
+
const matches = pattern.test(id);
|
|
21
|
+
pattern.lastIndex = 0;
|
|
22
|
+
return matches;
|
|
23
|
+
}
|
|
17
24
|
//#endregion
|
|
18
25
|
//#region src/style.ts
|
|
19
26
|
const PREPROCESSOR_LANGS = new Set([
|
|
@@ -259,12 +266,13 @@ function formatErrorMessage(error) {
|
|
|
259
266
|
return parts.join("\n");
|
|
260
267
|
}
|
|
261
268
|
async function stripTypeScript(filePath, code, sourceMap) {
|
|
262
|
-
const result = transform(filePath, code, {
|
|
269
|
+
const result = await transform(filePath, code, {
|
|
263
270
|
lang: "ts",
|
|
264
271
|
sourcemap: sourceMap,
|
|
265
272
|
sourceType: "module"
|
|
266
273
|
});
|
|
267
|
-
|
|
274
|
+
const errors = result.errors ?? [];
|
|
275
|
+
if (errors.length > 0) throw new Error(errors.map(formatErrorMessage).join("\n\n"));
|
|
268
276
|
return {
|
|
269
277
|
code: result.code,
|
|
270
278
|
map: result.map ?? null
|
package/dist/webpack.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/unplugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.85.0",
|
|
4
4
|
"description": "Experimental unplugin-based Vue SFC integration for rollup, webpack, and esbuild powered by Vize",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@vizejs/native": "0.
|
|
54
|
+
"@vizejs/native": "0.85.0",
|
|
55
55
|
"oxc-transform": "0.130.0",
|
|
56
56
|
"unplugin": "3.0.0"
|
|
57
57
|
},
|