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.

Modify a custom configuration file in a production environment

See original GitHub issue

The frontend provides a configuration file that sets the request interval and can be modified by field personnel. I customized config.js in the public directory. I want to modify the file in production env to achieve the purpose of modifying request interval. However, it does not work. Browser-side file is not updated, even if I clear the cache.

public/config.js

export const TIME = 2000;

src/app.js

import { TIME } from '../public/config.js';

What should I do to fix it ? Thank you for your reply!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
heyimalexcommented, Aug 16, 2019

I think you could do something like this.

public/config.js

window.MY_GLOBAL_TIME = 2000;

src/app.js

const TIME = window.MY_GLOBAL_TIME;

public/index.html

<!-- Add to head -->
<script src="%PUBLIC_URL%/config.js">
0reactions
stale[bot]commented, Sep 16, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure your project for a production environment
Learn what important configuration and release points to consider for your project in production environment.
Read more >
How to manage configuration file updates when deploying ...
After the deployment the configuration files can be modified by users. When deploying a new version of the application, the new version can ......
Read more >
Common Configuration Differences Between Development ...
Deploying a site to production entails copying all of the files to the production server in the development environment except for the Web....
Read more >
Managing Multiple Configuration File Environments with Pre ...
1. From Visual Studio, go File | New Project, and select ASP.NET Web Application. · 2. Right click in the Toolbars and ensure...
Read more >
Deploying Customizations Using the Configuration File
It is recommended to deploy customizations using the custom.conf.xml file when you want to move a set of customized files from one environment...
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