TypeScript Feature Flag
See original GitHub issueAt the moment, we do support basic TypeScript compilation via mix.ts('entry', 'output')
. but there doesn’t seem to be an easy way to, for example, add TypeScript support to a Vue project. You’d need to manually drop down to the mix.webpackConfig()
level.
I think we should make this simpler to activate. A couple options:
Choice 1: Feature Flag
mix.js('resources/js/app.js', 'dist')
.vue()
.typeScript();
With this approach, we’d only need to update Mix’s existing TypeScript
component to make the register
method’s entry
and output
parameters optional. That way, it can function as it always has…OR it can behave like a feature flag (just like mix.vue()
).
Choice 2: Make it an Option
mix.js('resources/js/app.js', 'dist')
.vue({ typeScript: true });
A second option which I personally like less would be to “turn on” TypeScript support as part of the mix.vue()
option parameters.
Thoughts?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
A dynamic feature flags library for Node.js - GitHub
A dynamic feature flags library for Node.js. This library gives you fine-grained control over rolling out and testing new features.
Read more >A Guide to Getting Started Quickly With JavaScript Feature Flags
Feature flags in JavaScript are no different. ... This post will specifically tackle feature flag management in JavaScript.
Read more >How to feature flag/toggle TypeScript service/class
I'm new to TypeScript, but does this help any? interface IService { doA(): void doB(): void } class Service implements IService { doA(): ......
Read more >How to use JavaScript feature flags aka feature toggles to ...
In this post, you will learn how to use JavaScript feature flags in a React.js application to deploy a small feature safely to...
Read more >Feature Flags in Nodejs + react - Medium
This tutorial shows you how you can set feature toggling (aka flag or switch) with NodeJs in minutes.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ugh I totally forgot that we already allowed for this when we switched to Vue being a feature flag.
I’m going to update the docs with a couple examples to make this clearer.
It was just “supported” given that we enabled Vue support all the time.