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:
commit
fa2dee585c
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ import prompts from 'prompts'
|
||||||
import { oraPromise } from 'ora'
|
import { oraPromise } from 'ora'
|
||||||
import { execa } from 'execa'
|
import { execa } from 'execa'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { fileURLToPath } from 'url'
|
import { fileURLToPath, pathToFileURL } from 'url'
|
||||||
|
|
||||||
// Current working directory
|
// Current working directory
|
||||||
let filename
|
let filename
|
||||||
|
@ -439,7 +439,7 @@ export const createEnvironment = async (choices) => {
|
||||||
shared: (await rdir(config.source.shared)).map((file) => relative(config.source.shared, file)),
|
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?
|
// does this base have parts with a lot of attending config?
|
||||||
config.complexParts = typeof config.templateData.parts[0] === 'object'
|
config.complexParts = typeof config.templateData.parts[0] === 'object'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue