@promoboxx/react-scripts-vite 0.1.30-vite5.1 → 0.1.30
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/README.md +13 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,6 @@ Put this in `src/react-scripts-vite.d.ts`:
|
|
|
46
46
|
import { viteConfig, pluginOptions } from '@promoboxx/react-scripts-vite'
|
|
47
47
|
|
|
48
48
|
// Setting one of the properties to `false` turns off the plugin entirely.
|
|
49
|
-
// Not sure why you would want to though.
|
|
50
49
|
pluginOptions.react = false
|
|
51
50
|
pluginOptions.pwa = {
|
|
52
51
|
registerType: 'autoUpdate',
|
|
@@ -72,18 +71,19 @@ export default defineConfig(async (env) => {
|
|
|
72
71
|
// await is needed so the type isn't `UserConfig | Promise<UserConfig>`
|
|
73
72
|
const config = await viteConfig(env)
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
...config,
|
|
77
|
-
plugins
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
},
|
|
74
|
+
config.plugins = [
|
|
75
|
+
...(config.plugins || []),
|
|
76
|
+
// Add whatever plugins you want.
|
|
77
|
+
YourVitePlugin(),
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
config.build = {
|
|
81
|
+
...config.build,
|
|
82
|
+
// Turn off sourcemaps.
|
|
83
|
+
sourcemap: false,
|
|
86
84
|
}
|
|
85
|
+
|
|
86
|
+
return config
|
|
87
87
|
})
|
|
88
88
|
```
|
|
89
89
|
|
|
@@ -112,6 +112,6 @@ react-scripts-vite uses [Vitest](https://vitest.dev) instead of Jest. Vitest has
|
|
|
112
112
|
The path to the test setup file has changed:
|
|
113
113
|
|
|
114
114
|
```shell
|
|
115
|
-
mkdir -p src/
|
|
115
|
+
mkdir -p src/test/
|
|
116
116
|
mv src/setupTests.ts src/test/setup.ts
|
|
117
117
|
```
|