@platformatic/vite 2.21.0-alpha.2 → 2.21.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 +49 -37
- package/package.json +7 -7
- package/schema.json +1 -1
package/index.js
CHANGED
|
@@ -79,25 +79,31 @@ export class ViteStackable extends BaseStackable {
|
|
|
79
79
|
await this.init()
|
|
80
80
|
const { build } = await importFile(resolve(this.#vite, 'dist/node/index.js'))
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
try {
|
|
83
|
+
globalThis.platformatic.isBuilding = true
|
|
84
|
+
|
|
85
|
+
await build({
|
|
86
|
+
root: this.root,
|
|
87
|
+
base: basePath,
|
|
88
|
+
mode: 'production',
|
|
89
|
+
configFile,
|
|
90
|
+
logLevel: this.logger.level,
|
|
91
|
+
build: {
|
|
92
|
+
outDir: config.application.outputDirectory
|
|
93
|
+
},
|
|
94
|
+
plugins: [
|
|
95
|
+
{
|
|
96
|
+
name: 'platformatic-build',
|
|
97
|
+
configResolved: config => {
|
|
98
|
+
basePath = ensureTrailingSlash(cleanBasePath(config.base))
|
|
99
|
+
outDir = resolve(this.root, config.build.outDir)
|
|
100
|
+
}
|
|
97
101
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
} finally {
|
|
105
|
+
globalThis.platformatic.isBuilding = false
|
|
106
|
+
}
|
|
101
107
|
|
|
102
108
|
await writeFile(resolve(outDir, '.platformatic-build.json'), JSON.stringify({ basePath }), 'utf-8')
|
|
103
109
|
}
|
|
@@ -322,26 +328,32 @@ export class ViteSSRStackable extends NodeStackable {
|
|
|
322
328
|
const { build } = await importFile(resolve(vite, 'dist/node/index.js'))
|
|
323
329
|
|
|
324
330
|
// Build the client
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
331
|
+
try {
|
|
332
|
+
globalThis.platformatic.isBuilding = true
|
|
333
|
+
|
|
334
|
+
await build({
|
|
335
|
+
root: resolve(this.root, clientDirectory),
|
|
336
|
+
base: basePath,
|
|
337
|
+
mode: 'production',
|
|
338
|
+
configFile,
|
|
339
|
+
logLevel: this.logger.level,
|
|
340
|
+
build: {
|
|
341
|
+
outDir: clientOutDir,
|
|
342
|
+
ssrManifest: true
|
|
343
|
+
},
|
|
344
|
+
plugins: [
|
|
345
|
+
{
|
|
346
|
+
name: 'platformatic-build',
|
|
347
|
+
configResolved: config => {
|
|
348
|
+
basePath = ensureTrailingSlash(cleanBasePath(config.base))
|
|
349
|
+
clientOutDir = resolve(this.root, clientDirectory, config.build.outDir)
|
|
350
|
+
}
|
|
341
351
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
352
|
+
]
|
|
353
|
+
})
|
|
354
|
+
} finally {
|
|
355
|
+
globalThis.platformatic.isBuilding = false
|
|
356
|
+
}
|
|
345
357
|
|
|
346
358
|
await writeFile(resolve(clientOutDir, '.platformatic-build.json'), JSON.stringify({ basePath }), 'utf-8')
|
|
347
359
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/vite",
|
|
3
|
-
"version": "2.21.0
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "Platformatic Vite Stackable",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"@fastify/static": "^8.0.0",
|
|
19
19
|
"fastify": "^5.0.0",
|
|
20
20
|
"semver": "^7.6.3",
|
|
21
|
-
"@platformatic/
|
|
22
|
-
"@platformatic/
|
|
23
|
-
"@platformatic/
|
|
24
|
-
"@platformatic/utils": "2.21.0
|
|
21
|
+
"@platformatic/basic": "2.21.0",
|
|
22
|
+
"@platformatic/node": "2.21.0",
|
|
23
|
+
"@platformatic/config": "2.21.0",
|
|
24
|
+
"@platformatic/utils": "2.21.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@fastify/vite": "^7.0.1",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"typescript": "^5.5.4",
|
|
35
35
|
"vite": "^5.4.0",
|
|
36
36
|
"ws": "^8.18.0",
|
|
37
|
-
"@platformatic/
|
|
38
|
-
"@platformatic/
|
|
37
|
+
"@platformatic/service": "2.21.0",
|
|
38
|
+
"@platformatic/composer": "2.21.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"test": "npm run lint && borp --concurrency=1 --no-timeout",
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/vite/2.21.0
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/vite/2.21.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Vite Stackable",
|
|
5
5
|
"type": "object",
|