-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
feat: add vite plugin #1651
feat: add vite plugin #1651
Conversation
transformHtmlImportSpecifier: (s) => { | ||
return this.meta.watchMode | ||
? s | ||
: s.replace(/\.html$/, '.$au.ts') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@3cp @brandonseydel This the way the plugin works, to work around issues of vite plugin order difference between dev and production build + watch/non watch modes.
It changes the .html
import to .$au.ts
and the intercepting loader from this plugin will take over.
`import { Metadata as $$M } from '@aurelia/metadata'; | ||
import { ExpressionKind as $$EK } from '@aurelia/runtime'; | ||
import { | ||
Controller as $$C, | ||
CustomElement as $$CE, | ||
IHydrationContext as $$IHC, | ||
PropertyBinding as $$PB, | ||
ContentBinding as $$CB, | ||
} from '@aurelia/runtime-html'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with these aliases, the imports for hmr can stay independent of the component import without having to worry about conflicts.
Cheers! |
What files do you expect? I'm a bit confused, can you help point out clearer? |
I didn't see any new package under packages-tooling. |
NVW, I found yours in vite.config.js. I was expecting you put that logic in a package. |
Codecov Report
@@ Coverage Diff @@
## master #1651 +/- ##
=======================================
Coverage 87.85% 87.85%
=======================================
Files 240 240
Lines 22174 22174
Branches 5009 5009
=======================================
Hits 19481 19481
Misses 2693 2693 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Pull Request
📖 Description