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.

I have some problem with source code........

See original GitHub issue

in ‘./src/tools/start.js’

  let handleBundleComplete = async () => {

  //I don't know what this assign operation means ?
  handleBundleComplete = stats => !stats.stats[1].compilation.errors.length && runServer();

  const server = await runServer();
  const bs = browserSync.create();

  bs.init({
    ...isDebug ? {} : { notify: false, ui: false },

    proxy: {
      target: server.host,
      middleware: [wpMiddleware, hotMiddleware],
      proxyOptions: {
        xfwd: true,
      },
    },
  }, resolve);
};

bundler.plugin('done', stats => handleBundleComplete(stats));

Is syntax like this ?

let handleBundleComplete = async ( ) => { handleBundleComplete = (...) => {...} do something.. }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
almeynmancommented, Apr 13, 2017

@weishijun14 Oh got it!

When it is run for the first time it does some extra stuff:

const server = await runServer();
  const bs = browserSync.create();

  bs.init({
    ...isDebug ? {} : { notify: false, ui: false },

    proxy: {
      target: server.host,
      middleware: [wpMiddleware, hotMiddleware],
      proxyOptions: {
        xfwd: true,
      },
    },
  }, resolve);

For 2nd, 3rd,… it is overridden to

handleBundleComplete = stats => !stats.stats[1].compilation.errors.length && runServer();
0reactions
terminalqocommented, Apr 14, 2017

@almeynman I found it, call Lazy loading function…

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Mistakes You're Probably Baking Into Your Source Code
Mistake 1: No Configurable Logging Level. Basically, you should have different levels of logging. Some common logging levels include Debug, ...
Read more >
3 Things you should do to quickly fix your problem in a open ...
If you still cannot get your problems fixed, don't forget it is open source and you can always dive into the source code...
Read more >
What is Source Code in Programming and How Does It Work?
Source code is the fundamental component of a computer program that is created by a programmer. It can be read and easily understood...
Read more >
Source Code Leaks: The Real Problem Nobody Is Paying ...
Isolated, most of the source code is deemed to have no real value or use unless the attackers have other pieces of technology...
Read more >
Identifying design problems in the source code
Due to missing, informal or outdated design documentation, developers often have to rely on the source code to identify design problems.
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