Skip to content
Draft
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3de0537
test(vite-plugin-nitro): add snapshot test for Vite config mutations
benpsnyder Apr 13, 2026
8826989
feat(vite-plugin-angular): enhance debugging documentation and improv…
benpsnyder Apr 13, 2026
6f72fa1
feat: add error handling for @reference in comments and improve direc…
benpsnyder Apr 13, 2026
43a5438
chore: update dependencies and configurations for Docusaurus and Angu…
benpsnyder Apr 13, 2026
70263db
chore: update debugging documentation with additional package overrid…
benpsnyder Apr 13, 2026
efcb7f2
chore: update debugging documentation to clarify usage of catalog and…
benpsnyder Apr 13, 2026
e76e35a
docs: enhance documentation on duplicate analog() registrations and S…
benpsnyder Apr 14, 2026
9f39aa7
Merge remote-tracking branch 'origin/alpha' into feat/support-snyder-…
benpsnyder Apr 14, 2026
18312c0
Merge remote-tracking branch 'origin/alpha' into feat/support-snyder-…
benpsnyder Apr 14, 2026
229b9e4
chore: update comments for clarity in Angular and Nitro plugins, and …
benpsnyder Apr 14, 2026
3155d19
feat: enhance configuration handling and improve test stability by cl…
benpsnyder Apr 14, 2026
e0b491b
chore: refine comments and enhance test stability in Angular and Nitr…
benpsnyder Apr 14, 2026
71b31a9
feat: improve handling of CSS comments and references, ensuring quote…
benpsnyder Apr 14, 2026
69af095
feat: add function to detect @reference text in comments and refine C…
benpsnyder Apr 14, 2026
ac4a4ca
feat: refactor CSS directive handling by extracting utility functions…
benpsnyder Apr 14, 2026
ac2dd07
feat: implement TailwindReferenceError handling in JIT plugin and aug…
benpsnyder Apr 14, 2026
00a43bd
fix: update console warning implementation in JIT plugin tests to ret…
benpsnyder Apr 14, 2026
49e660b
feat: add support for selectorless compilation in Angular plugin, enh…
benpsnyder Apr 15, 2026
6679136
Merge remote-tracking branch 'analogjs/alpha' into feat/snyder-suppor…
benpsnyder Apr 15, 2026
cb5feab
feat(vite-plugin-angular): enhance live reload plugin with Windows pa…
benpsnyder Apr 15, 2026
638d30e
feat(vite-plugin-angular): improve selectorless compilation handling …
benpsnyder Apr 15, 2026
756a1de
Merge remote-tracking branch 'analogjs/alpha' into feat/selectorless-…
benpsnyder Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/platform/src/lib/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,26 @@ export interface Options {
*/
useAngularCompilationAPI?: boolean;

/**
* Forward Angular selectorless compilation support into
* `@analogjs/vite-plugin-angular`.
*
* This toggles Angular's compiler-wide selectorless mode. Analog may
* otherwise infer a default from file-based pages or route entry points,
* including additional page roots discovered from libraries. That auto
* mode remains the default for backwards compatibility with existing
* selectorless route components, so set this explicitly when you need to
* pin the behavior.
*
* Also accepted at `vite.experimental.enableSelectorless` for backwards
* compatibility.
*
* Has no effect when `vite` is set to `false`.
*/
enableSelectorless?: PluginOptions['experimental'] extends object
? NonNullable<PluginOptions['experimental']>['enableSelectorless']
: boolean;

/**
* Enable typed route table generation for type-safe navigation.
*
Expand Down
37 changes: 37 additions & 0 deletions packages/platform/src/lib/platform-plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,43 @@ describe('platformPlugin', () => {
);
});

it('forwards experimental.enableSelectorless to the Angular vite plugin', () => {
platformPlugin({
experimental: {
enableSelectorless: false,
},
});

expect(angularSpy).toHaveBeenCalledWith(
expect.objectContaining({
experimental: expect.objectContaining({
enableSelectorless: false,
}),
}),
);
});

it('prefers top-level selectorless config over legacy vite.experimental config', () => {
platformPlugin({
experimental: {
enableSelectorless: false,
},
vite: {
experimental: {
enableSelectorless: true,
},
},
});

expect(angularSpy).toHaveBeenCalledWith(
expect.objectContaining({
experimental: expect.objectContaining({
enableSelectorless: false,
}),
}),
);
});

it('does not force semantic type checking onto the dev hot path by default', () => {
platformPlugin();

Expand Down
9 changes: 9 additions & 0 deletions packages/platform/src/lib/platform-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,19 @@ export function platformPlugin(opts: Options = {}): Plugin[] {
);
}

// Keep the top-level Analog experimental surface and the legacy
// `vite.experimental` compatibility surface in lockstep. Missing one of
// these compiler flags here makes app config appear correct while the
// lower-level Angular plugin still sees a different value.
const useAngularCompilationAPI =
platformOptions.experimental?.useAngularCompilationAPI ??
viteExperimental?.useAngularCompilationAPI;
const enableSelectorless =
platformOptions.experimental?.enableSelectorless ??
viteExperimental?.enableSelectorless;
debugPlatform('experimental options resolved', {
useAngularCompilationAPI: !!useAngularCompilationAPI,
enableSelectorless,
typedRouter: platformOptions.experimental?.typedRouter,
stylePipeline: !!platformOptions.experimental?.stylePipeline,
});
Expand Down Expand Up @@ -132,6 +140,7 @@ export function platformPlugin(opts: Options = {}): Plugin[] {
experimental: {
...(viteExperimental ?? {}),
useAngularCompilationAPI,
enableSelectorless,
},
}),
)),
Expand Down
Loading
Loading