@seayoo-web/scripts 2.2.0 → 2.3.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/index.js +6 -4
- package/package.json +1 -1
- package/types/src/vite.page.d.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -134,6 +134,8 @@ function htmlInjectPlugin(data) {
|
|
|
134
134
|
}
|
|
135
135
|
function definePageBuildConfig(option) {
|
|
136
136
|
const {
|
|
137
|
+
notVuePage,
|
|
138
|
+
noPolyfill,
|
|
137
139
|
manualChunks,
|
|
138
140
|
badPackages = [],
|
|
139
141
|
plugins = [],
|
|
@@ -186,9 +188,9 @@ function definePageBuildConfig(option) {
|
|
|
186
188
|
}
|
|
187
189
|
},
|
|
188
190
|
plugins: [
|
|
189
|
-
vue(),
|
|
190
|
-
vueDevTools(),
|
|
191
|
-
legacy({
|
|
191
|
+
notVuePage ? null : vue(),
|
|
192
|
+
notVuePage ? null : vueDevTools(),
|
|
193
|
+
noPolyfill ? null : legacy({
|
|
192
194
|
targets: ["defaults", "> 0.1%", "last 5 versions and not dead"],
|
|
193
195
|
// https://github.com/vitejs/vite/blob/main/packages/plugin-legacy/src/index.ts#L170
|
|
194
196
|
// https://unpkg.com/browse/core-js@3.41.0/
|
|
@@ -224,7 +226,7 @@ function definePageBuildConfig(option) {
|
|
|
224
226
|
user: envs.deployUser,
|
|
225
227
|
key: envs.deployKey,
|
|
226
228
|
debug: envs.deployDebug,
|
|
227
|
-
preview: (_c = option == null ? void 0 : option.finder) == null ? void 0 : _c.preview,
|
|
229
|
+
preview: ((_c = option == null ? void 0 : option.finder) == null ? void 0 : _c.preview) ?? true,
|
|
228
230
|
commitLogs: isProductMode && gitInfo.logs.length > 0 ? "\n" + gitInfo.logs.join("\n") : void 0,
|
|
229
231
|
onFinished() {
|
|
230
232
|
if (isProductMode) {
|
package/package.json
CHANGED
package/types/src/vite.page.d.ts
CHANGED