有没有办法可以将 Svelte kit 节点应用程序部署在子文件夹中?
我的主应用程序也是一个已在端口 3000 中运行的 svelte kit 节点应用程序 (https://qa.testing.com)。现在我希望另一个应用程序在端口中的 https://qa.testing.com/video 上运行4000。这是我的 svelte.config.js 文件
import adapter from '@sveltejs/adapter-node';
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
kit: {
adapter: adapter(),
paths: {
assets: 'https://qa.testing.com/video',
base: '/video'
}
}
};
export default config;
,它在我的本地主机中工作正常。当我在 QA 服务器中部署时,主页加载时出现错误,并且资源未在 https:// 中加载qa.testing.com/video。以下是错误 https://qa.testing.com /video/_app/assets/pages/__layout.svelte-9742a0ca.css net::ERR_ABORTED 404
请指导我来解决这个问题。我犯了什么错误?
My main app is also a svelte kit node app running already in port 3000 (https://qa.testing.com). Now I wanted another app to be run on https://qa.testing.com/video in port 4000. This is my svelte.config.js file
import adapter from '@sveltejs/adapter-node';
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
kit: {
adapter: adapter(),
paths: {
assets: 'https://qa.testing.com/video',
base: '/video'
}
}
};
export default config;
This is working fine in my localhost. When I deploy in our QA server, the home page loading with errors, and the assets are not loading in https://qa.testing.com/video. Following is the error
https://qa.testing.com/video/_app/assets/pages/__layout.svelte-9742a0ca.css net::ERR_ABORTED 404
Please guide me to fix this issue. What mistake I did?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论