veslx 0.0.16 → 0.0.18

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.
Files changed (2) hide show
  1. package/package.json +3 -5
  2. package/vite.config.ts +0 -26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veslx",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "veslx": "bin/veslx.ts"
@@ -52,7 +52,7 @@
52
52
  "remark-math": "^6.0.0",
53
53
  "remark-mdx-frontmatter": "^5.2.0",
54
54
  "shiki": "^3.15.0",
55
- "vite": "npm:rolldown-vite@7.2.2",
55
+ "vite": "^6.0.3",
56
56
  "@vitejs/plugin-react": "^5.1.0",
57
57
  "@mdx-js/rollup": "^3.1.1",
58
58
  "@tailwindcss/postcss": "^4.1.17",
@@ -79,7 +79,5 @@
79
79
  "typescript": "~5.9.3",
80
80
  "typescript-eslint": "^8.46.3"
81
81
  },
82
- "overrides": {
83
- "vite": "npm:rolldown-vite@7.2.2"
84
- }
82
+ "overrides": {}
85
83
  }
package/vite.config.ts CHANGED
@@ -13,37 +13,11 @@ import path from 'path'
13
13
 
14
14
  const __dirname = path.dirname(fileURLToPath(import.meta.url))
15
15
 
16
- // CommonJS packages that need default export shimming when served via /@fs/
17
- const cjsPackages = ['extend', 'acorn-jsx', 'bail', 'trough', 'is-plain-obj']
18
-
19
16
  export default defineConfig({
20
17
  clearScreen: false,
21
18
  cacheDir: path.join(__dirname, 'node_modules/.vite'),
22
19
  publicDir: path.join(__dirname, 'public'),
23
20
  plugins: [
24
- // Plugin to fix CommonJS default exports when served via /@fs/
25
- {
26
- name: 'fix-cjs-default-export',
27
- enforce: 'pre',
28
- transform(code, id) {
29
- // Only process CommonJS files from node_modules served via /@fs/
30
- if (!id.includes('node_modules') || !id.endsWith('.js')) return null
31
-
32
- // Check if it's a problematic CJS package
33
- const isCjsPackage = cjsPackages.some(pkg => id.includes(`/${pkg}/`))
34
- if (!isCjsPackage) return null
35
-
36
- // Check if it's a CommonJS module (has module.exports but no export default)
37
- if (code.includes('module.exports') && !code.includes('export default') && !code.includes('export {')) {
38
- // Wrap the CommonJS module to provide a default export
39
- return {
40
- code: `${code}\nexport default module.exports;`,
41
- map: null
42
- }
43
- }
44
- return null
45
- }
46
- },
47
21
  tailwindcss(),
48
22
  // MDX must run before Vite's default transforms
49
23
  {