@promoboxx/react-scripts-vite 0.1.28 → 0.1.30-rc.1
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/dist/cli.js +6 -2
- package/dist/client.d.ts +2 -35
- package/dist/replaceEnvInHtml.d.ts +2 -2
- package/dist/viteConfig.d.ts +1 -1
- package/dist/viteConfig.js +3 -1
- package/package.json +12 -12
package/dist/cli.js
CHANGED
|
@@ -35,9 +35,13 @@ function spawnAndExit(command, args = [], env) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
const [
|
|
38
|
-
// eslint
|
|
38
|
+
// We should probably change our eslint config to ignore unused variables that
|
|
39
|
+
// start with an underscore. TypeScript ignores them, Rust ignores, them, it's
|
|
40
|
+
// been a convention for almost two decades.
|
|
41
|
+
// https://stackoverflow.com/a/77067927
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- see above
|
|
39
43
|
_interpreter,
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- see above
|
|
41
45
|
_thisFile, command, ...args] = process.argv;
|
|
42
46
|
main(command, args);
|
|
43
47
|
//# sourceMappingURL=cli.js.map
|
package/dist/client.d.ts
CHANGED
|
@@ -1,38 +1,5 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
2
|
/// <reference types="vite-plugin-svgr/client" />
|
|
3
3
|
/// <reference types="vitest/globals" />
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare module 'virtual:pwa-register' {
|
|
7
|
-
export type RegisterSWOptions = {
|
|
8
|
-
immediate?: boolean
|
|
9
|
-
onNeedRefresh?: () => void
|
|
10
|
-
onOfflineReady?: () => void
|
|
11
|
-
onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void
|
|
12
|
-
onRegisterError?: (error: any) => void
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function registerSW(
|
|
16
|
-
options?: RegisterSWOptions,
|
|
17
|
-
): (reloadPage?: boolean) => Promise<void>
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// https://github.com/antfu/vite-plugin-pwa/blob/951311fa811b8cee98ea5530522961f64645cd75/client.d.ts
|
|
21
|
-
declare module 'virtual:pwa-register/react' {
|
|
22
|
-
// @ts-ignore ignore when react is not installed
|
|
23
|
-
import { Dispatch, SetStateAction } from 'react'
|
|
24
|
-
|
|
25
|
-
export type RegisterSWOptions = {
|
|
26
|
-
immediate?: boolean
|
|
27
|
-
onNeedRefresh?: () => void
|
|
28
|
-
onOfflineReady?: () => void
|
|
29
|
-
onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void
|
|
30
|
-
onRegisterError?: (error: any) => void
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function useRegisterSW(options?: RegisterSWOptions): {
|
|
34
|
-
needRefresh: [boolean, Dispatch<SetStateAction<boolean>>]
|
|
35
|
-
offlineReady: [boolean, Dispatch<SetStateAction<boolean>>]
|
|
36
|
-
updateServiceWorker: (reloadPage?: boolean) => Promise<void>
|
|
37
|
-
}
|
|
38
|
-
}
|
|
4
|
+
/// <reference types="vite-plugin-pwa/vanillajs" />
|
|
5
|
+
/// <reference types="vite-plugin-pwa/react" />
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Plugin } from 'vite';
|
|
1
|
+
import { type Plugin } from 'vite';
|
|
2
2
|
/**
|
|
3
3
|
* Replace env variables in index.html
|
|
4
4
|
* @see https://github.com/vitejs/vite/issues/3105#issuecomment-939703781
|
|
5
5
|
* @see https://vitejs.dev/guide/api-plugin.html#transformindexhtml
|
|
6
6
|
*/
|
|
7
|
-
declare function replaceEnvInHtml(): Plugin
|
|
7
|
+
declare function replaceEnvInHtml(): Plugin<any>;
|
|
8
8
|
export default replaceEnvInHtml;
|
package/dist/viteConfig.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import react from '@vitejs/plugin-react';
|
|
2
|
-
import { UserConfigFn } from 'vite';
|
|
2
|
+
import { type UserConfigFn } from 'vite';
|
|
3
3
|
import pluginChecker from 'vite-plugin-checker';
|
|
4
4
|
import envCompatible from 'vite-plugin-env-compatible';
|
|
5
5
|
import { VitePWA } from 'vite-plugin-pwa';
|
package/dist/viteConfig.js
CHANGED
|
@@ -21,9 +21,11 @@ exports.pluginOptions = {
|
|
|
21
21
|
},
|
|
22
22
|
typescript: process.env.TSC_COMPILE_ON_ERROR !== 'true',
|
|
23
23
|
enableBuild: true,
|
|
24
|
+
overlay: {
|
|
25
|
+
initialIsOpen: false,
|
|
26
|
+
},
|
|
24
27
|
},
|
|
25
28
|
react: {
|
|
26
|
-
fastRefresh: process.env.FAST_REFRESH !== 'false',
|
|
27
29
|
jsxRuntime: process.env.DISABLE_NEW_JSX_TRANSFORM === 'true' ? 'classic' : undefined,
|
|
28
30
|
},
|
|
29
31
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promoboxx/react-scripts-vite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30-rc.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"keywords": [],
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
"author": "",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@promoboxx/eslint-config": "^
|
|
18
|
-
"prettier": "^
|
|
19
|
-
"typescript": "^5.
|
|
17
|
+
"@promoboxx/eslint-config": "^3.1.0",
|
|
18
|
+
"prettier": "^3.1.0",
|
|
19
|
+
"typescript": "^5.2.2"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@vitejs/plugin-react": "^
|
|
23
|
-
"eslint": "^
|
|
22
|
+
"@vitejs/plugin-react": "^4.2.0",
|
|
23
|
+
"eslint": "^8.54.0",
|
|
24
24
|
"jsdom": "^22.1.0",
|
|
25
|
-
"vite": "^
|
|
26
|
-
"vite-plugin-checker": "^0.6.
|
|
25
|
+
"vite": "^5.0.0",
|
|
26
|
+
"vite-plugin-checker": "^0.6.2",
|
|
27
27
|
"vite-plugin-env-compatible": "^1.1.1",
|
|
28
|
-
"vite-plugin-pwa": "^0.
|
|
29
|
-
"vite-plugin-svgr": "^
|
|
30
|
-
"vite-tsconfig-paths": "^4.2.
|
|
31
|
-
"vitest": "^0.
|
|
28
|
+
"vite-plugin-pwa": "^0.17.0",
|
|
29
|
+
"vite-plugin-svgr": "^4.2.0",
|
|
30
|
+
"vite-tsconfig-paths": "^4.2.1",
|
|
31
|
+
"vitest": "^0.34.6"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist/cli.d.ts",
|