Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions parent-vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import manifestJSON from "./target/manifest.json";

const cssLink = manifestJSON["index.html"]["css"][0];
module.exports = defineConfig({
// The default base is "/", which results in absolute links being generated, e.g. /assets/foo.js.
// However, we want to be able to serve chatterbox from a directory which isn't the server's root.
// By setting base to an empty string, relative links are generated, e.g. assets/foo.js.
base: "",
build: {
rollupOptions: {
input: {
Expand Down
5 changes: 5 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ module.exports = defineConfig(({ command }) => {
} else {
return {
// build specific config

// The default base is "/", which results in absolute links being generated, e.g. /assets/foo.js.
// However, we want to be able to serve chatterbox from a directory which isn't the server's root.
// By setting base to an empty string, relative links are generated, e.g. assets/foo.js.
base: "",
build: {
rollupOptions: {
input: {
Expand Down