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.

Drop browsersync completely in production build

See original GitHub issue

Why in npm run build we still use browsersync? browsersync make sense for development. I deployed my app by running npm run build, expect everything to worked, but I saw movement on my app without me clicking anything, then I realised it was caused by browsersync.

What’s the purpose of browsersync in production and how to turn it off? just comment the config in tools/disServer.js ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
coryhousecommented, Sep 19, 2017

Slingshot generates static files to the dist folder. Browsersync is just set up so that you can run the production build on your local machine for review. For production, you should use a traditional web server to serve the static files written to /dist. So your deployment process really just needs to copy the files in /dist to your prod webserver.

0reactions
mikedevitacommented, Sep 22, 2017

unfortunately no I don’t. not even aware if there is an automated process for that part. typically we use http-proxy-middleware and reverse proxy to the sap back end during development. that way we only push to sap when were ready for a release and we know the UI is good to go.

I’m at SAP TechEd right now but shoot me an email Mike.devita@srpnet.commailto:Mike.devita@srpnet.com if you need further help since this is out of this kits scope and I’d hate to clutter the issue up with SAP stuff 😜.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Browsersync options
Browsersync makes your browser testing workflow faster by synchronising URLs, interactions and code changes across multiple devices.
Read more >
Excluding files for BrowserSync not working - Stack Overflow
I found a solution to my problem. It was actually crashing because of my path declaration. This is what I had before: var...
Read more >
CSS not updating with browsersync intermittently - sage
Browsersync trying to do its thing but the CSS not updating. Using 'yarn run build' which seems to reset things for a while...
Read more >
browser-sync-webpack-plugin | Yarn - Package Manager
BrowserSync plugin for Webpack. Easily use BrowserSync in your Webpack project. Install: $ npm install --save-dev browser-sync-webpack-plugin.
Read more >
Live preview on any device or browser with Browsersync
Toggle individual sync settings to create your preferred test environment. Install Browsersync. The installation process is fully documented on ...
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