@rpcbase/vite 0.27.0 → 0.29.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/index.js +18 -8
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -40,13 +40,13 @@ const resolveAliases = {
|
|
|
40
40
|
process.cwd(),
|
|
41
41
|
"./node_modules/set-cookie-parser",
|
|
42
42
|
),
|
|
43
|
-
// "react-dom": path.resolve(import.meta.dirname, "./node_modules/react-dom"),
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
const integratedPackages = [
|
|
47
46
|
"@hookform/resolvers",
|
|
48
47
|
"@headlessui/react",
|
|
49
48
|
"axios",
|
|
49
|
+
"framer-motion",
|
|
50
50
|
"libphonenumber-js",
|
|
51
51
|
"maplibre-gl",
|
|
52
52
|
"openai",
|
|
@@ -114,6 +114,7 @@ const getBaseConfig = ({ command, mode, isSsrBuild, isPreview }) => {
|
|
|
114
114
|
alias: {
|
|
115
115
|
...resolveAliases,
|
|
116
116
|
},
|
|
117
|
+
dedupe: ["react", "react-dom"],
|
|
117
118
|
preserveSymlinks: true,
|
|
118
119
|
},
|
|
119
120
|
ssr: {
|
|
@@ -133,6 +134,7 @@ const getBaseConfig = ({ command, mode, isSsrBuild, isPreview }) => {
|
|
|
133
134
|
"@rpcbase/form",
|
|
134
135
|
"@rpcbase/router",
|
|
135
136
|
"@radix-ui/*",
|
|
137
|
+
// TMP only in sample app?
|
|
136
138
|
// "react", "react-dom/server",
|
|
137
139
|
// "react-hook-form",
|
|
138
140
|
// "react-dom"
|
|
@@ -149,20 +151,28 @@ export const extendConfig = (userConfig) => {
|
|
|
149
151
|
} else {
|
|
150
152
|
config = userConfig
|
|
151
153
|
}
|
|
152
|
-
|
|
153
154
|
const baseConfig = getBaseConfig({ command, mode, isSsrBuild, isPreview })
|
|
155
|
+
|
|
154
156
|
return mergeConfig(baseConfig, config)
|
|
155
157
|
})
|
|
156
158
|
}
|
|
157
159
|
|
|
158
|
-
export const createServer =
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
export const createServer = viteCreateServer
|
|
161
|
+
// export const createServer = async (config /* : Record<string, any>*/) => {
|
|
162
|
+
// const env = {
|
|
163
|
+
// command: "serve",
|
|
164
|
+
// mode: process.env.NODE_ENV ?? "development",
|
|
165
|
+
// isSsrBuild: false,
|
|
166
|
+
// isPreview: false,
|
|
167
|
+
// }
|
|
161
168
|
|
|
162
|
-
|
|
169
|
+
// const extendedConfig = extendConfig(config)(env)
|
|
170
|
+
// delete extendedConfig.plugins
|
|
163
171
|
|
|
164
|
-
|
|
165
|
-
|
|
172
|
+
// const viteServer = await viteCreateServer(extendedConfig)
|
|
173
|
+
|
|
174
|
+
// return viteServer
|
|
175
|
+
// }
|
|
166
176
|
|
|
167
177
|
export const disableAppCache = (app) => {
|
|
168
178
|
app.set("etag", false)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@tailwindcss/vite": "4.1.4",
|
|
32
32
|
"@vitejs/plugin-react-swc": "3.9.0",
|
|
33
33
|
"clsx": "2.1.1",
|
|
34
|
+
"framer-motion": "12.7.4",
|
|
34
35
|
"libphonenumber-js": "1.12.7",
|
|
35
36
|
"maplibre-gl": "5.3.1",
|
|
36
37
|
"nocache": "4.0.0",
|