@athenna/http 5.7.0 → 5.8.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/package.json +5 -2
- package/src/vite/index.d.ts +2 -0
- package/src/vite/index.js +31 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@athenna/http",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "The Athenna Http server. Built on top of fastify.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "João Lenon <lenon@athenna.io>",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"./types": "./src/types/index.js",
|
|
52
52
|
"./package": "./package.json",
|
|
53
53
|
"./package.json": "./package.json",
|
|
54
|
+
"./vite": "./src/vite/index.js",
|
|
54
55
|
"./testing/plugins": "./src/testing/plugins/index.js",
|
|
55
56
|
"./kernels/HttpKernel": "./src/kernels/HttpKernel.js",
|
|
56
57
|
"./handlers/HttpExceptionHandler": "./src/handlers/HttpExceptionHandler.js",
|
|
@@ -104,7 +105,9 @@
|
|
|
104
105
|
"husky": "^3.1.0",
|
|
105
106
|
"lint-staged": "^12.5.0",
|
|
106
107
|
"ora": "^8.1.1",
|
|
107
|
-
"prettier": "^2.8.8"
|
|
108
|
+
"prettier": "^2.8.8",
|
|
109
|
+
"vite": "^6.0.6",
|
|
110
|
+
"vite-plugin-restart": "^0.4.2"
|
|
108
111
|
},
|
|
109
112
|
"c8": {
|
|
110
113
|
"all": true,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Path } from '@athenna/common';
|
|
2
|
+
import { mergeConfig, defineConfig } from 'vite';
|
|
3
|
+
export function defineAthennaConfig(config) {
|
|
4
|
+
const defaultConfig = {
|
|
5
|
+
root: Path.pwd(),
|
|
6
|
+
assetsUrl: '/assets',
|
|
7
|
+
buildDirectory: 'public/assets',
|
|
8
|
+
css: {
|
|
9
|
+
preprocessorOptions: {
|
|
10
|
+
scss: {
|
|
11
|
+
api: 'modern'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
build: {
|
|
16
|
+
assetsDir: '',
|
|
17
|
+
manifest: true,
|
|
18
|
+
emptyOutDir: true,
|
|
19
|
+
outDir: 'public/assets',
|
|
20
|
+
assetsInlineLimit: 0,
|
|
21
|
+
rollupOptions: {
|
|
22
|
+
output: {
|
|
23
|
+
entryFileNames: '[name].js',
|
|
24
|
+
chunkFileNames: '[name].js',
|
|
25
|
+
assetFileNames: '[name].[ext]'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return defineConfig(mergeConfig(defaultConfig, config));
|
|
31
|
+
}
|