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

feat(vite-plugin-angular): add tsTransformers config #213

Merged
merged 2 commits into from
Jan 16, 2023
Merged

feat(vite-plugin-angular): add tsTransformers config #213

merged 2 commits into from
Jan 16, 2023

Conversation

ch1ffa
Copy link
Contributor

@ch1ffa ch1ffa commented Jan 16, 2023

Add configuration to allow custom TypeScript transformers to be added

Closes #210

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • vite-angular-plugin
  • astro-angular
  • create-analog
  • router
  • platform
  • content

What is the current behavior?

There is no way to add a custom TypeScript transformer

Issue Number: #210

What is the new behavior?

Added config parameter which allows to add a custom transformer to before array

import { defineConfig } from 'vite';
import analog from '@analogjs/platform';

// https://vitejs.dev/config/
export default defineConfig(() => {
  return {
    plugins: [
      analog({
        advanced: {
          tsTransformers: [customTransformer]
        }
      })
    ]
  };
});

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I tested changes on a small application that uses a transformer from https://github.com/morrys/ts-relay-plugin

Everything works as expected but I'm not sure should we add a test or an example app here.

Add configuration to allow custom TypeScript transformers to be added

Closes #210
@netlify
Copy link

netlify bot commented Jan 16, 2023

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 5b92259
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/63c5ade971ca650008e12aee
😎 Deploy Preview https://deploy-preview-213--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 settings.

@netlify
Copy link

netlify bot commented Jan 16, 2023

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit 5b92259
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/63c5ade9e4d4c700099565a5
😎 Deploy Preview https://deploy-preview-213--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 settings.

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.

Nice work!

@brandonroberts brandonroberts merged commit e733cd1 into analogjs:main Jan 16, 2023
@brandonroberts
Copy link
Member

Thanks! @allcontributors add @ch1ffa for code

@allcontributors
Copy link
Contributor

@brandonroberts

I've put up a pull request to add @ch1ffa! 🎉

Villanuevand pushed a commit to Villanuevand/analog that referenced this pull request Sep 12, 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.

Feature: add configuration to allow custom TypeScript transformers to be added.
2 participants