1
0
Fork 0

Merge pull request #4293 from trentonTrama/fix/issue-4290/support-windows-paths-in-new-design

fix(new-design): Import using absolute identifier
This commit is contained in:
Joost De Cock 2023-06-15 20:29:25 +02:00 committed by GitHub
commit fa2dee585c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ import prompts from 'prompts'
import { oraPromise } from 'ora'
import { execa } from 'execa'
import axios from 'axios'
import { fileURLToPath } from 'url'
import { fileURLToPath, pathToFileURL } from 'url'
// Current working directory
let filename
@ -439,7 +439,7 @@ export const createEnvironment = async (choices) => {
shared: (await rdir(config.source.shared)).map((file) => relative(config.source.shared, file)),
}
config.templateData = await import(config.source.templateData)
config.templateData = await import(pathToFileURL(config.source.templateData))
// does this base have parts with a lot of attending config?
config.complexParts = typeof config.templateData.parts[0] === 'object'