smapiot / piral

🚀 Framework for next generation web apps using micro frontends. ⭐️ Star to support our work!
https://piral.io
MIT License
1.71k stars 127 forks source link

fix: Fix codegen'd import statements in Windows environments #620

Closed peter-at-work closed 1 year ago

peter-at-work commented 1 year ago

New Pull Request

For more information, see the CONTRIBUTING guide.

Prerequisites

Please make sure you can check the following boxes:

Type(s) of Changes

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

Description

Fixes https://github.com/smapiot/piral/issues/619

For relative paths generated from the piral-core codegen module, they are to be used in codegen'd import statements. So the paths have to be normalized back to use posix-type slash path separators.

Remarks

The issue only appears when a piral instance is being provisioned/built in a Windows environment. Import statements should always be using the posix-style path separators.

github-actions[bot] commented 1 year ago

File size impact

Merging feature/fix-win32-codegen into develop impact files as follow:

empty-piral (no impact)
Files new size
Unmodified (2) 28.6 kB (0 B / +0%) :ghost:
Total (2) 28.6 kB (0 B / +0%) :ghost:
minimal-piral (no impact)
Files new size
Unmodified (2) 251 kB (0 B / +0%) :ghost:
Total (2) 251 kB (0 B / +0%) :ghost:
sample-cross-fx (no impact)
Files new size
Unmodified (3) 2.17 MB (0 B / +0%) :ghost:
Total (3) 2.17 MB (0 B / +0%) :ghost:
sample-piral (no impact)
Files new size
Unmodified (3) 639 kB (0 B / +0%) :ghost:
Total (3) 639 kB (0 B / +0%) :ghost:
sample-piral-core (no impact)
Files new size
Unmodified (3) 305 kB (0 B / +0%) :ghost:
Total (3) 305 kB (0 B / +0%) :ghost:

Generated by @jsenv/file-size-impact during check-bundle-size#5948332760 on 00e9864