mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-20 19:47:52 +02:00
fix(v2): wrong modules path on windows (#1513)
* fix: wrong modules path on windows * use json stringify to escape string
This commit is contained in:
parent
1282df063c
commit
34d674cdf5
1 changed files with 2 additions and 2 deletions
|
@ -107,8 +107,8 @@ ${Object.keys(registry)
|
||||||
.map(
|
.map(
|
||||||
key => ` '${key}': {
|
key => ` '${key}': {
|
||||||
'importStatement': ${registry[key].importStatement},
|
'importStatement': ${registry[key].importStatement},
|
||||||
'module': '${registry[key].modulePath}',
|
'module': ${JSON.stringify(registry[key].modulePath)},
|
||||||
'webpack': require.resolveWeak('${registry[key].modulePath}'),
|
'webpack': require.resolveWeak(${JSON.stringify(registry[key].modulePath)}),
|
||||||
},`,
|
},`,
|
||||||
)
|
)
|
||||||
.join('\n')}};\n`,
|
.join('\n')}};\n`,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue