Skip to content

Commit

Permalink
fix: handle export config path correctly on Window
Browse files Browse the repository at this point in the history
  • Loading branch information
rogden committed Jun 24, 2024
1 parent 67629ee commit 47dbc64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ program
port: args.port,
tailwindConfigProvider: async () => {
const configPath = resolveConfigPath(program.config)
const configHref = pathToFileURL(configPath).href;
const configHref = pathToFileURL(configPath).href
delete require.cache[configHref]
const config = await import(configHref)
return config.default || config
Expand All @@ -28,7 +28,9 @@ program
.command('export [outputDir]')
.description('Create a static export of the viewer')
.action((outputDir = './tcv-build') => {
require('./export')(outputDir, resolveConfigPath(program.config))
const configPath = resolveConfigPath(program.config)
const configHref = pathToFileURL(configPath).href
require('./export')(outputDir, configHref)
})

program.parse(process.argv)
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 47dbc64

Please sign in to comment.