vite-config-factory 1.0.0 → 1.1.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 +3 -3
- package/package.json +4 -1
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineConfig } from 'vite'
|
|
2
2
|
import { resolve } from 'path'
|
|
3
|
-
import
|
|
3
|
+
import { manifestPlugin } from 'vite-plugin-simple-manifest'
|
|
4
|
+
import react from '@vitejs/plugin-react'
|
|
4
5
|
|
|
5
6
|
export function createViteConfig(entries, options = {}) {
|
|
6
7
|
const { outDir = 'dist', manifestFile = 'manifest.json' } = options
|
|
7
|
-
const { manifestPlugin } = simpleManifest
|
|
8
8
|
|
|
9
9
|
return defineConfig(({ mode }) => {
|
|
10
10
|
const isProduction = mode === 'production'
|
|
@@ -60,7 +60,7 @@ export function createViteConfig(entries, options = {}) {
|
|
|
60
60
|
'~': resolve(process.cwd(), 'node_modules')
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
plugins: [manifestPlugin(manifestFile)]
|
|
63
|
+
plugins: [manifestPlugin(manifestFile), react()]
|
|
64
64
|
}
|
|
65
65
|
})
|
|
66
66
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-config-factory",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"description": "A simple Vite plugin for common vite config across multiple projects.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"keywords": ["vite", "plugin", "config", "factory"],
|
|
@@ -11,5 +11,8 @@
|
|
|
11
11
|
"vite": "^7.1.2",
|
|
12
12
|
"vite-plugin-simple-manifest": "^1.0.3"
|
|
13
13
|
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@vitejs/plugin-react": "^5.1.2"
|
|
16
|
+
},
|
|
14
17
|
"types": "index.d.ts"
|
|
15
18
|
}
|