@hirarijs/loader-vue 1.0.0 → 1.0.2
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/index.cjs +7 -1
- package/dist/index.d.cts +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +7 -1
- package/package.json +36 -35
package/dist/index.cjs
CHANGED
|
@@ -46,6 +46,11 @@ const ${componentVar} = {}`;
|
|
|
46
46
|
return { code, componentVar };
|
|
47
47
|
}
|
|
48
48
|
function compileVue(code, filename, ctx) {
|
|
49
|
+
const opts = ctx.loaderConfig.pluginOptions?.["@hirarijs/loader-vue"] || {};
|
|
50
|
+
const ignoreNm = opts.ignoreNodeModules !== false && opts.allowNodeModules !== true;
|
|
51
|
+
if (ignoreNm && filename.includes("node_modules")) {
|
|
52
|
+
return { code, continue: true };
|
|
53
|
+
}
|
|
49
54
|
const { descriptor } = (0, import_compiler_sfc.parse)(code, { filename });
|
|
50
55
|
const id = (0, import_crypto.createHash)("sha256").update(filename).digest("hex").slice(0, 8);
|
|
51
56
|
let output;
|
|
@@ -102,7 +107,8 @@ export default ${componentVar}`;
|
|
|
102
107
|
return {
|
|
103
108
|
code: transformed.code,
|
|
104
109
|
map: transformed.map,
|
|
105
|
-
format: ctx.format
|
|
110
|
+
format: ctx.format,
|
|
111
|
+
continue: opts.continue === true
|
|
106
112
|
};
|
|
107
113
|
}
|
|
108
114
|
var plugin = {
|
package/dist/index.d.cts
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,11 @@ const ${componentVar} = {}`;
|
|
|
24
24
|
return { code, componentVar };
|
|
25
25
|
}
|
|
26
26
|
function compileVue(code, filename, ctx) {
|
|
27
|
+
const opts = ctx.loaderConfig.pluginOptions?.["@hirarijs/loader-vue"] || {};
|
|
28
|
+
const ignoreNm = opts.ignoreNodeModules !== false && opts.allowNodeModules !== true;
|
|
29
|
+
if (ignoreNm && filename.includes("node_modules")) {
|
|
30
|
+
return { code, continue: true };
|
|
31
|
+
}
|
|
27
32
|
const { descriptor } = parse(code, { filename });
|
|
28
33
|
const id = createHash("sha256").update(filename).digest("hex").slice(0, 8);
|
|
29
34
|
let output;
|
|
@@ -80,7 +85,8 @@ export default ${componentVar}`;
|
|
|
80
85
|
return {
|
|
81
86
|
code: transformed.code,
|
|
82
87
|
map: transformed.map,
|
|
83
|
-
format: ctx.format
|
|
88
|
+
format: ctx.format,
|
|
89
|
+
continue: opts.continue === true
|
|
84
90
|
};
|
|
85
91
|
}
|
|
86
92
|
var plugin = {
|
package/package.json
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@hirarijs/loader-vue",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Vue SFC loader plugin for HirariJS loader",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs",
|
|
13
|
-
"types": "./dist/index.d.ts"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
21
|
-
"test": "node --test"
|
|
22
|
-
},
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"@hirarijs/loader": "*"
|
|
25
|
-
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@hirarijs/loader-vue",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Vue SFC loader plugin for HirariJS loader",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
21
|
+
"test": "node --test"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@hirarijs/loader": "*"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@vue/compiler-sfc": "^3.4.15",
|
|
29
|
+
"esbuild": "^0.21.5"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@hirarijs/loader": "workspace:*",
|
|
33
|
+
"tsup": "^8.0.1",
|
|
34
|
+
"typescript": "^5.3.3"
|
|
35
|
+
}
|
|
36
|
+
}
|