Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: consistent route import for async and sync mode #187

Merged
merged 2 commits into from
Mar 19, 2022

Conversation

shkreios
Copy link
Contributor

Current behavior

Async imports are handled inline

New behavior

Async imports are handled the same way as sync imports

Advantages

  • Clean stringify code => no special cases
  • Option in the future to allow preloaded

@shkreios shkreios force-pushed the main branch 2 times, most recently from 33c043a to e9e089a Compare March 18, 2022 15:05
@shkreios shkreios changed the title Remove inlining import statements for async importmode Switch from inline import statements to toplevel import statements for async importmode Mar 18, 2022
Copy link
Owner

@hannoeru hannoeru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, but can you revert all coding style changes that cause by prettier? I personally don't use prettier.

@shkreios
Copy link
Contributor Author

Looks great, but can you revert all coding style changes that cause by prettier? I personally don't use prettier.

I tried to configure prettier to look as similar as possible to your codestyle. Which styling tool are you using so I can easily revert the changes?

Thanks

@hannoeru
Copy link
Owner

Only ESLint, I don't want to have any coding style changes on the existing code in this PR.

@shkreios
Copy link
Contributor Author

Ah sorry I thought you maybe had some tool, so contributors could easliy conform to the existing coding style.

@shkreios shkreios requested a review from hannoeru March 19, 2022 14:53
@hannoeru
Copy link
Owner

Just add a vscode settings to disable prettier in this repo, thanks for revert those changes.

@hannoeru hannoeru changed the title Switch from inline import statements to toplevel import statements for async importmode refactor: consistent route import for async and sync mode Mar 19, 2022
@hannoeru hannoeru merged commit 39892da into hannoeru:main Mar 19, 2022
ckangwen pushed a commit to charrue/vite-plugin-pages that referenced this pull request Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants