getfilepress 0.1.17 → 0.1.19
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 +1 -1
- package/packages/app/vite.config.ts +12 -6
package/package.json
CHANGED
|
@@ -133,13 +133,15 @@ export default defineConfig(async () => {
|
|
|
133
133
|
writeFileSync(join(filepressCache, 'redirects.txt'), serializeRedirects(hints.redirects));
|
|
134
134
|
|
|
135
135
|
const host = process.env.HOST?.trim() || '127.0.0.1';
|
|
136
|
+
const listen = {
|
|
137
|
+
host,
|
|
138
|
+
// Tailscale MagicDNS (*.ts.net) and other LAN names. IPs are already allowed.
|
|
139
|
+
allowedHosts: true as const,
|
|
140
|
+
...(fixedPort ? { port: fixedPort, strictPort: true } : {}),
|
|
141
|
+
};
|
|
136
142
|
return {
|
|
137
|
-
server:
|
|
138
|
-
|
|
139
|
-
: undefined,
|
|
140
|
-
preview: fixedPort
|
|
141
|
-
? { host, port: fixedPort, strictPort: true }
|
|
142
|
-
: undefined,
|
|
143
|
+
server: listen,
|
|
144
|
+
preview: listen,
|
|
143
145
|
resolve: {
|
|
144
146
|
alias: [
|
|
145
147
|
{ find: /^@filepress\/core\/server$/, replacement: coreServer },
|
|
@@ -190,6 +192,10 @@ export default defineConfig(async () => {
|
|
|
190
192
|
if (pathMounts.some((m) => path === m.url || path.startsWith(`${m.url}/`))) {
|
|
191
193
|
return;
|
|
192
194
|
}
|
|
195
|
+
// Layout always links these; sites may ship only one.
|
|
196
|
+
if (path === '/favicon.png' || path === '/favicon.svg') {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
193
199
|
throw new Error(message);
|
|
194
200
|
},
|
|
195
201
|
handleUnseenRoutes: ({ routes }) => {
|