Skip to content

Commit

Permalink
fix: use posix path in generated JS modules
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Feb 10, 2024
1 parent 84be348 commit faa2ac7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cli/lib/next-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default async function updateNextConfigFile(parentDir: string = './', vid
}

let code =
`const { withNextVideo } = require('${path.join(PACKAGE_NAME, 'process')}')
`const { withNextVideo } = require('${path.posix.join(PACKAGE_NAME, 'process')}')
${generateCode(mod).code}
`;
Expand All @@ -87,7 +87,7 @@ ${generateCode(mod).code}
const mod = await loadFile(configPath);

mod.imports.$add({
from: path.join(PACKAGE_NAME, 'process'),
from: path.posix.join(PACKAGE_NAME, 'process'),
imported: 'withNextVideo',
local: 'withNextVideo',
});
Expand Down

0 comments on commit faa2ac7

Please sign in to comment.