valaxy-theme-yun 0.20.0-beta.8 → 0.20.0-beta.9

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 CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.20.0-beta.8",
3
+ "type": "module",
4
+ "version": "0.20.0-beta.9",
4
5
  "author": {
5
6
  "email": "me@yunyoujun.cn",
6
7
  "name": "YunYouJun",
@@ -1,6 +1,7 @@
1
1
  import { gsap } from 'gsap'
2
- // use it for esm
3
- import ScrollToPlugin from 'gsap/ScrollToPlugin'
2
+ // gsap/ScrollToPlugin is ESM, but gsap not include 'type:module' in package.json
3
+ // use cjs for vite-ssg, optimizeDeps for ESM
4
+ import ScrollToPlugin from 'gsap/dist/ScrollToPlugin'
4
5
 
5
6
  gsap.registerPlugin(ScrollToPlugin)
6
7
 
package/valaxy.config.ts CHANGED
@@ -20,6 +20,7 @@ function ThemeVitePlugin(options: ResolvedValaxyOptions<ThemeConfig>): Plugin {
20
20
  },
21
21
 
22
22
  optimizeDeps: {
23
+ include: ['gsap/dist/ScrollToPlugin'],
23
24
  exclude: ['@docsearch/js'],
24
25
  },
25
26
  }