@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-web/scripts",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "scripts for seayoo web repos",
5
5
  "type": "module",
6
6
  "source": "index.ts",
@@ -1,5 +1,9 @@
1
1
  import type { UserConfig, UserConfigFnPromise } from "vite";
2
2
  interface ExternalConfig {
3
+ /** 是否不使用 vue */
4
+ notVuePage?: boolean;
5
+ /** 是否不使用 polyfill */
6
+ noPolyfill?: boolean;
3
7
  /** sentry 配置 */
4
8
  sentry?: {
5
9
  project?: string;