@yoamigo.com/core 0.3.3 → 0.3.5
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/plugin.js +7 -8
- package/package.json +1 -4
package/dist/plugin.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// src/plugin/index.ts
|
|
2
2
|
import react from "@vitejs/plugin-react";
|
|
3
|
-
import preact from "@preact/preset-vite";
|
|
4
3
|
import path from "path";
|
|
5
4
|
function yoamigoPlugin(options = {}) {
|
|
6
5
|
const templateDir = process.cwd();
|
|
@@ -44,12 +43,6 @@ if (import.meta.hot) {
|
|
|
44
43
|
const aliasArray = [
|
|
45
44
|
// Production aliases must come FIRST for priority
|
|
46
45
|
...isProd ? [
|
|
47
|
-
// === React -> Preact (must be first for broad matching) ===
|
|
48
|
-
{ find: "react", replacement: "preact/compat" },
|
|
49
|
-
{ find: "react-dom/test-utils", replacement: "preact/test-utils" },
|
|
50
|
-
{ find: "react-dom/client", replacement: "preact/compat/client" },
|
|
51
|
-
{ find: "react-dom", replacement: "preact/compat" },
|
|
52
|
-
{ find: "react/jsx-runtime", replacement: "preact/jsx-runtime" },
|
|
53
46
|
// === @yoamigo.com/core -> Production barrel ===
|
|
54
47
|
// Redirect the entire components import to use static versions.
|
|
55
48
|
// This removes Tiptap and editing UI from the production bundle.
|
|
@@ -74,7 +67,7 @@ if (import.meta.hot) {
|
|
|
74
67
|
}))
|
|
75
68
|
];
|
|
76
69
|
return {
|
|
77
|
-
plugins: [
|
|
70
|
+
plugins: [react(), ...options.plugins || []],
|
|
78
71
|
// Expose YA_ prefixed env vars to client code
|
|
79
72
|
envPrefix: "YA_",
|
|
80
73
|
// Serve static files from public/ directory
|
|
@@ -88,6 +81,12 @@ if (import.meta.hot) {
|
|
|
88
81
|
port: process.env.PORT ? parseInt(process.env.PORT, 10) : 5173,
|
|
89
82
|
strictPort: false,
|
|
90
83
|
// Allow Vite to find next available port
|
|
84
|
+
watch: {
|
|
85
|
+
// Prevent Vite from watching node_modules and pnpm store
|
|
86
|
+
// Critical when node_modules contains symlinks to pnpm store (bundled deps)
|
|
87
|
+
// Without this, Vite exceeds inotify file watcher limit (ENOSPC error)
|
|
88
|
+
ignored: ["**/node_modules/**", "**/.pnpm-store/**"]
|
|
89
|
+
},
|
|
91
90
|
hmr: {
|
|
92
91
|
// When behind a proxy (builder worker), HMR needs to connect through the proxy
|
|
93
92
|
// Setting these to undefined lets Vite auto-detect from the page URL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoamigo.com/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Core components, router, and utilities for YoAmigo templates",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -65,11 +65,9 @@
|
|
|
65
65
|
"@floating-ui/react": "^0.27.16",
|
|
66
66
|
"clsx": "^2.1.1",
|
|
67
67
|
"html2canvas-pro": "^1.6.1",
|
|
68
|
-
"preact": "^10.27.2",
|
|
69
68
|
"wouter": "^3.8.0"
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
|
-
"@preact/preset-vite": "^2.8.0",
|
|
73
71
|
"@tiptap/core": "^3.11.1",
|
|
74
72
|
"@tiptap/extension-link": "^3.11.1",
|
|
75
73
|
"@tiptap/extension-text-style": "^3.11.1",
|
|
@@ -89,7 +87,6 @@
|
|
|
89
87
|
"vite": "^7.2.4"
|
|
90
88
|
},
|
|
91
89
|
"peerDependencies": {
|
|
92
|
-
"@preact/preset-vite": "^2.0.0",
|
|
93
90
|
"@tiptap/core": "^3.0.0",
|
|
94
91
|
"@tiptap/extension-link": "^3.0.0",
|
|
95
92
|
"@tiptap/extension-text-style": "^3.0.0",
|