question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript Feature Flag

See original GitHub issue

At 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:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
JeffreyWaycommented, Jun 4, 2021

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.

0reactions
thecrypticacecommented, Jun 4, 2021

It was just “supported” given that we enabled Vue support all the time.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found