@fias/create-fias-plugin 1.1.0 → 1.1.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/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { defineConfig } from 'vite';
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
3
|
|
|
4
|
+
// In a GitHub Codespace, the dev server is reached through the *.app.github.dev
|
|
5
|
+
// forwarded URL, never directly via localhost. Bind to all interfaces, declare
|
|
6
|
+
// the forwarded host trusted, and route HMR websockets through the public
|
|
7
|
+
// domain on port 443.
|
|
8
|
+
const codespaceHost = process.env.CODESPACE_NAME
|
|
9
|
+
? `${process.env.CODESPACE_NAME}-3100.${process.env.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}`
|
|
10
|
+
: null;
|
|
11
|
+
|
|
4
12
|
export default defineConfig({
|
|
5
13
|
plugins: [react()],
|
|
6
14
|
build: {
|
|
@@ -10,9 +18,13 @@ export default defineConfig({
|
|
|
10
18
|
},
|
|
11
19
|
},
|
|
12
20
|
server: {
|
|
21
|
+
host: true,
|
|
13
22
|
port: 3100,
|
|
14
23
|
cors: true,
|
|
15
24
|
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
16
|
-
hmr:
|
|
25
|
+
hmr: codespaceHost
|
|
26
|
+
? { host: codespaceHost, protocol: 'wss', clientPort: 443 }
|
|
27
|
+
: { host: 'localhost' },
|
|
28
|
+
allowedHosts: codespaceHost ? [codespaceHost] : undefined,
|
|
17
29
|
},
|
|
18
30
|
});
|