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.

Support environments for shareable configs

See original GitHub issue

I would like to keep my shareable config similarly to package.json field “browserslist”, like this:

module.exports = {
  development: ['last 2 chrome versions', 'last 2 firefox versions', 'last 2 edge versions'],
  production: [
    '>1%',
    'last 3 versions',
    'not dead',
    'not op_mini all',
    'Firefox ESR',
    'not ie < 11',
  ],
};

For now it’s impossible because of error: config exports not an array of queries .

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
sybrendotingacommented, Apr 11, 2019

I was experimenting with implementing a shareable config for our company today. Because we also have two environments in our current setup I was looking into how to implement this. I ended up in this topic. For us this is a great use-case aswel. For now, I decided to only implement the production environment, that will also be used in our development environment.

We would like to use this feature as @JamiesonRoberts describes it. It would be great to have a base configuration, but also have the option to override rules for a specific project.

1reaction
aicommented, Mar 15, 2020

How often is this file read? What is the impact of not having it cached?

If we will use JS file, webpack/Parcel will not be sure that the content of the file was not changed.

It certainly shouldn’t be FORCING security related decisions.

I believe that every software should think about security.

Any your dependency can be used to hack the system. If a tool can potentially be used with non-trused user input, it is a security tool.

For now, I’ll hold off on a PR until we can come to a consensus.

This issue is about adding environments to shared config.

Removing mandatory browserslist-config prefix or adding JS-based config should be discussed in separated issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shareable Configs - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
A common way of managing configurations for multiple ...
This article intended to share ideas and solutions to address some challenges related to Configuration Management, especially in the cloud ...
Read more >
Shared Configuration | Microsoft Learn
This article focuses on the shared centralized global configuration feature. This feature helps support homogeneous Web farms where servers ...
Read more >
Shared AWS config and credentials files
The shared AWS config and credentials files contain a set of profiles. A profile is a set of configuration values that can be...
Read more >
Using shared settings between multiple environments in Angular
Moreover, there are some environmental variables that are common between these environments. For example, API URL to fetch data from server.
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