+
Skip to content

fix(vite-plugin-angular): include analog page files in additional compilation includes #1264

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

Merged

Conversation

illunix
Copy link
Contributor

@illunix illunix commented Aug 8, 2024

.analog and .agx files are not includes when they are in additional dir paths

Closes #

[optional] What gif best describes this PR or how it makes you feel?

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit 03dd652
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/66b5805267fef20008524dc2
😎 Deploy Preview https://deploy-preview-1264--analog-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 03dd652
🔍 Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/66b58052fa75ff000834f71f
😎 Deploy Preview https://deploy-preview-1264--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 03dd652
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/66b58052e8d2180009744650
😎 Deploy Preview https://deploy-preview-1264--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for analog-ng-app ready!

Name Link
🔨 Latest commit 03dd652
🔍 Latest deploy log https://app.netlify.com/sites/analog-ng-app/deploys/66b580523d286b000889dab9
😎 Deploy Preview https://deploy-preview-1264--analog-ng-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@illunix
Copy link
Contributor Author

illunix commented Aug 8, 2024

It has been registered but shows that it missing export default, can you provide more info what can be wrong? @brandonroberts
image
image

@illunix
Copy link
Contributor Author

illunix commented Aug 8, 2024

So I've made proposed changes but there is still same error @brandonroberts

@brandonroberts
Copy link
Member

@illunix needs a fix here

https://github.com/analogjs/analog/blob/beta/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts#L493

    const globs = [
      ...pluginOptions.include.map((glob) => `${workspaceRoot}${glob}`),
      ...pluginOptions.include.map((glob) => `${workspaceRoot}${glob}`.replace(/\.ts$/, '.analog'),
    ];

@illunix
Copy link
Contributor Author

illunix commented Aug 8, 2024

@illunix needs a fix here

https://github.com/analogjs/analog/blob/beta/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts#L493

    const globs = [
      ...pluginOptions.include.map((glob) => `${workspaceRoot}${glob}`),
      ...pluginOptions.include.map((glob) => `${workspaceRoot}${glob}`.replace(/\.ts$/, '.analog'),
    ];

You mean to add this second line in array or what? Because in the og code this line does not exist

@brandonroberts
Copy link
Member

@illunix needs a fix here
https://github.com/analogjs/analog/blob/beta/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts#L493

    const globs = [
      ...pluginOptions.include.map((glob) => `${workspaceRoot}${glob}`),
      ...pluginOptions.include.map((glob) => `${workspaceRoot}${glob}`.replace(/\.ts$/, '.analog'),
    ];

You mean to add this second line in array or what? Because in the og code this line does not exist

Yes, add the second line to the array

@illunix
Copy link
Contributor Author

illunix commented Aug 8, 2024

@illunix needs a fix here
https://github.com/analogjs/analog/blob/beta/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts#L493

    const globs = [
      ...pluginOptions.include.map((glob) => `${workspaceRoot}${glob}`),
      ...pluginOptions.include.map((glob) => `${workspaceRoot}${glob}`.replace(/\.ts$/, '.analog'),
    ];

You mean to add this second line in array or what? Because in the og code this line does not exist

Yes, add the second line to the array

So I've already tried and it gives same error, about missing default export

@brandonroberts
Copy link
Member

@illunix you may to restart the dev server locally and hard refresh

@illunix
Copy link
Contributor Author

illunix commented Aug 8, 2024

@illunix you may to restart the dev server locally and hard refresh

Okey, I'll try again in a couple of minutes

@illunix
Copy link
Contributor Author

illunix commented Aug 8, 2024

I've tried, and as I said, still there is this error @brandonroberts, is it working for u?

@brandonroberts
Copy link
Member

I've tried, and as I said, still there is this error @brandonroberts, is it working for u?

Yes, it works locally for me with all the changes

@illunix
Copy link
Contributor Author

illunix commented Aug 8, 2024

@brandonroberts Then look at the https://github.com/analogjs/analog/pull/1264/files changed files and tell me if I missed something or everything is right, because I think I've done all required changes

@brandonroberts brandonroberts marked this pull request as ready for review August 9, 2024 02:38
@illunix
Copy link
Contributor Author

illunix commented Aug 9, 2024

@brandonroberts I've tested right now after your changes and still this error occurs

@brandonroberts brandonroberts changed the title fix: include analog files in additionalPagesDirs fix(vite-plugin-angular): include analog page files in additional compilation includes Aug 9, 2024
Copy link
Member

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

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

LGTM

@brandonroberts brandonroberts merged commit bde2104 into analogjs:beta Aug 9, 2024
24 checks passed
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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载