We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c611adc + 7983b9b commit 16d714eCopy full SHA for 16d714e
packages/electron-snowpack/lib/snowpack-plugin-relative-proxy-imports.js
@@ -34,12 +34,15 @@ module.exports = () => {
34
await Promise.all(
35
proxies.map(async (filePath) => {
36
const firstLine = await readFirstLine(filePath);
37
- const relativeProxyImport = path.relative(buildDirectory, filePath);
+ const relativeProxyImport = path
38
+ .relative(buildDirectory, filePath)
39
+ .split(path.sep)
40
+ .join(path.posix.sep);
41
const relativeImport = relativeProxyImport.substring(
42
0,
43
relativeProxyImport.length - PROXY_SUFFIX.length
44
);
- if (firstLine === `export default "${path.join('/', relativeImport)}";`) {
45
+ if (firstLine === `export default "/${relativeImport}";`) {
46
await writeFirstLine(filePath, `export default "${relativeImport}";`);
47
}
48
})
0 commit comments