minista 4.0.1 → 4.0.3
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/package.json +3 -3
- package/src/plugins/bundle/index.js +1 -1
- package/src/plugins/entry/index.js +1 -1
- package/src/plugins/image/index.js +1 -1
- package/src/plugins/island/index.js +1 -1
- package/src/plugins/search/index.js +4 -3
- package/src/plugins/sprite/index.js +1 -1
- package/src/plugins/ssg/index.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minista",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minista": "./bin/minista.js"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@mdx-js/rollup": "^3.1.1",
|
|
69
|
-
"@swc/core": "^1.15.
|
|
69
|
+
"@swc/core": "^1.15.32",
|
|
70
70
|
"archiver": "^7.0.1",
|
|
71
71
|
"cross-spawn": "^7.0.6",
|
|
72
72
|
"image-size": "^2.0.2",
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"remark-mdx-frontmatter": "^5.2.0",
|
|
81
81
|
"sharp": "^0.34.5",
|
|
82
82
|
"svgo": "^4.0.1",
|
|
83
|
-
"tinyglobby": "^0.2.
|
|
83
|
+
"tinyglobby": "^0.2.16"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -132,7 +132,7 @@ export function pluginSearch(uOpts = {}) {
|
|
|
132
132
|
|
|
133
133
|
return {
|
|
134
134
|
build: {
|
|
135
|
-
|
|
135
|
+
rolldownOptions: {
|
|
136
136
|
input: {
|
|
137
137
|
[pathId]: searchFile,
|
|
138
138
|
},
|
|
@@ -209,9 +209,10 @@ export function pluginSearch(uOpts = {}) {
|
|
|
209
209
|
const inputEl = parsedHtml.querySelector(`[${opts.inputAttr}]`)
|
|
210
210
|
if (!inputEl) continue
|
|
211
211
|
|
|
212
|
-
const
|
|
212
|
+
const isIndex = htmlName.split("/").pop() === "index.html"
|
|
213
|
+
const level = (htmlName.match(/\//g) || []).length + (isIndex ? 0 : 1)
|
|
213
214
|
const bodyEl = parsedHtml.querySelector("body")
|
|
214
|
-
bodyEl?.setAttribute(opts.relativeAttr, String(
|
|
215
|
+
bodyEl?.setAttribute(opts.relativeAttr, String(level))
|
|
215
216
|
|
|
216
217
|
item.source = parsedHtml.toString()
|
|
217
218
|
}
|
package/src/plugins/ssg/index.js
CHANGED
|
@@ -116,7 +116,7 @@ export function pluginSsg(uOpts = {}) {
|
|
|
116
116
|
if (isSsr) {
|
|
117
117
|
return {
|
|
118
118
|
build: {
|
|
119
|
-
|
|
119
|
+
rolldownOptions: {
|
|
120
120
|
input: {
|
|
121
121
|
[tempName]: globFile,
|
|
122
122
|
},
|
|
@@ -150,7 +150,7 @@ export function pluginSsg(uOpts = {}) {
|
|
|
150
150
|
|
|
151
151
|
return {
|
|
152
152
|
build: {
|
|
153
|
-
|
|
153
|
+
rolldownOptions: {
|
|
154
154
|
input: {
|
|
155
155
|
[tempName]: throughFile,
|
|
156
156
|
},
|