Skip to content

Commit

Permalink
build: Fix npm build on MS window native (#630)
Browse files Browse the repository at this point in the history
Fix build on window native
  • Loading branch information
duboisp authored Sep 13, 2024
1 parent 3f44479 commit 0a33996
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/react-ssr/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ const createReactWrapperModules = async ({ entryPoints, distRoot }) => {
const enums = parseEnums(componentsTypeSource);

let i = 0;
for (const importPath of entryPoints) {
for (let importPath of entryPoints) {

// Build on Window: File prefix required
importPath = importPath.replace( /^[A-Z]:\\/, 'file://$&' );

const component = await import(importPath);

let defineFunctionName = 'd';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ export class TextValueAccessor extends ValueAccessor {
super(el);
}
}`;
expect(finalText.trim()).toEqual(exptectedOutput.trim().replace(/\n/g, EOL));
expect(finalText.trim().replace(/\r/g, "").replace(/\n/g, EOL)).toEqual(exptectedOutput.trim().replace(/\n/g, EOL));
});
});

0 comments on commit 0a33996

Please sign in to comment.