Skip to content

fix(dev-server): fix loading css error - #3

Merged
craftzdog merged 1 commit into
inkdropapp:mainfrom
khouwdevin:fix/theme-css-not-loading
Aug 28, 2026
Merged

fix(dev-server): fix loading css error#3
craftzdog merged 1 commit into
inkdropapp:mainfrom
khouwdevin:fix/theme-css-not-loading

Conversation

@khouwdevin

Copy link
Copy Markdown
Contributor

Hi Takuya-san,

Found another issue: theme CSS isn't loading at all when the dev server starts — comes up completely unstyled.

Turns out Vite needs the /@fs prefix to serve absolute filesystem paths through import() — dev-server.tsx was just concatenating the raw path, which doesn't work. I also tried WSL since the docs suggest that should sidestep path issues, but it failed the same way there too.

Fix:

const normalizedBase = baseProjectPath.replace(/\\/g, '/')
const fsBase = normalizedBase.startsWith('/') ? normalizedBase : `/${normalizedBase}`
const cssFiles = styleSheets.map((ss) => `/@fs${fsBase}/styles/${ss}`)

The normalizedBase step is there to handle Windows paths (backslashes, drive letters) — Unix paths don't need it, but the normalize is harmless either way.

Tested on Windows and WSL, both work now.

@craftzdog
craftzdog merged commit fdbcdfa into inkdropapp:main Aug 28, 2026
1 check passed
@craftzdog

Copy link
Copy Markdown
Contributor

Thanks! tested it on my mac as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants