@best-shot/preset-mini 0.11.19 → 0.11.20
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/loader.mjs +11 -30
- package/package.json +3 -3
package/loader.mjs
CHANGED
|
@@ -17,7 +17,8 @@ export function applyLoaders(chain, options) {
|
|
|
17
17
|
.merge(babelRule.use('babel-loader').entries())
|
|
18
18
|
.end()
|
|
19
19
|
.use('sfc-split-loader')
|
|
20
|
-
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
20
|
+
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
21
|
+
.options(options);
|
|
21
22
|
|
|
22
23
|
vueRule
|
|
23
24
|
.rule('extract-vue-template')
|
|
@@ -31,30 +32,14 @@ export function applyLoaders(chain, options) {
|
|
|
31
32
|
.loader('@into-mini/wxml-loader')
|
|
32
33
|
.end()
|
|
33
34
|
.use('sfc-split-loader')
|
|
34
|
-
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
35
|
-
|
|
36
|
-
vueRule
|
|
37
|
-
.rule('extract-vue-config-json')
|
|
38
|
-
.test(vueRegexp)
|
|
39
|
-
.issuer(vueRegexp)
|
|
40
|
-
.resourceQuery(/type=config&lang=json/)
|
|
41
|
-
.type('asset/resource')
|
|
42
|
-
.generator.filename('[entry][hash:8].json')
|
|
43
|
-
.end()
|
|
44
|
-
.use('entry-loader')
|
|
45
|
-
.loader('@into-mini/sfc-split-plugin/dist/loader/entry-loader.mjs')
|
|
46
|
-
.end()
|
|
47
|
-
.use('yaml-loader')
|
|
48
|
-
.loader('yaml-patch-loader')
|
|
49
|
-
.end()
|
|
50
|
-
.use('sfc-split-loader')
|
|
51
|
-
.loader('@into-mini/sfc-split-loader/dist/index.mjs');
|
|
35
|
+
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
36
|
+
.options(options);
|
|
52
37
|
|
|
53
38
|
vueRule
|
|
54
|
-
.rule('extract-vue-config
|
|
39
|
+
.rule('extract-vue-config')
|
|
55
40
|
.test(vueRegexp)
|
|
56
41
|
.issuer(vueRegexp)
|
|
57
|
-
.resourceQuery(/type=config&lang=yaml/)
|
|
42
|
+
.resourceQuery(/type=config&lang=(yaml|json)/)
|
|
58
43
|
.type('asset/resource')
|
|
59
44
|
.generator.filename('[entry][hash:8].json')
|
|
60
45
|
.end()
|
|
@@ -65,7 +50,8 @@ export function applyLoaders(chain, options) {
|
|
|
65
50
|
.loader('yaml-patch-loader')
|
|
66
51
|
.end()
|
|
67
52
|
.use('sfc-split-loader')
|
|
68
|
-
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
53
|
+
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
54
|
+
.options(options);
|
|
69
55
|
|
|
70
56
|
const xRule = vueRule
|
|
71
57
|
.rule('extract-vue-style')
|
|
@@ -92,19 +78,14 @@ export function applyLoaders(chain, options) {
|
|
|
92
78
|
xRule
|
|
93
79
|
.rule('extract')
|
|
94
80
|
.use('sfc-split-loader')
|
|
95
|
-
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
81
|
+
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
82
|
+
.options(options);
|
|
96
83
|
|
|
97
84
|
vueRule
|
|
98
85
|
.rule('split-vue')
|
|
99
86
|
.resourceQuery({ not: /type=/ })
|
|
100
87
|
.type('javascript/esm')
|
|
101
88
|
.use('sfc-split-loader')
|
|
102
|
-
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
103
|
-
|
|
104
|
-
vueRule
|
|
105
|
-
.rule('pre-vue')
|
|
106
|
-
.resourceQuery({ not: /type=/ })
|
|
107
|
-
.use('sfc-split-pre')
|
|
108
|
-
.loader('@into-mini/sfc-split-loader/dist/next.mjs')
|
|
89
|
+
.loader('@into-mini/sfc-split-loader/dist/index.mjs')
|
|
109
90
|
.options(options);
|
|
110
91
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@best-shot/preset-mini",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.20",
|
|
4
4
|
"description": "A `best-shot` preset for mini program project",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@babel/core": "^7.28.5",
|
|
40
|
-
"@best-shot/preset-babel": "^0.18.6",
|
|
41
40
|
"@best-shot/preset-style": "^0.16.3",
|
|
42
|
-
"@best-shot/core": "^0.13.10"
|
|
41
|
+
"@best-shot/core": "^0.13.10",
|
|
42
|
+
"@best-shot/preset-babel": "^0.18.6"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=22.11.0"
|