Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty stream windows #2

Closed
foxdonut opened this issue Aug 10, 2018 · 6 comments
Closed

Empty stream windows #2

foxdonut opened this issue Aug 10, 2018 · 6 comments

Comments

@foxdonut
Copy link
Owner

As reported by @smuemd, multiple duplicate empty stream windows show up in the tracer when using browser-sync

@smuemd
Copy link

smuemd commented Aug 10, 2018

Here is my spike app.js config for reproducing this

const htmlStandards = require('reshape-standard')
const cssStandards = require('spike-css-standards')
const jsStandards = require('spike-js-standards')
const react = require('babel-preset-react')

const env = process.env.SPIKE_ENV

module.exports = {
  babel: jsStandards({ appendPresets: [[react]] }),
  devtool: 'source-map',
  entry: {
    'js/main': [ env === 'production' ? './assets/js/index.js' : './assets/js/_dev.js' ]
  },
  ignore: ['.**/**', '**/layout.html', '**/_*', '**/.*', 'readme.md', 'yarn.lock', 'package-lock.json'],
  postcss: cssStandards({
    minify: env === 'production',
    warnForDuplicates: env !== 'production'
  }),
  reshape: htmlStandards({
    locals: (ctx) => { return { foo: 'bar' } },
    minify: env === 'production'
  }),
  vendor: 'assets/vendor/**'
}

the entry file is in assets/js/_dev.js

and looks like this

import meiosisTracer from 'meiosis-tracer'
import initialized from './index'

initialized
  .then(Main => {
    const models = Main.models
    meiosisTracer({
      streams: [ models ]
      // streams: [{ stream: models, label: 'mysuperstream' }]
    })
  })
  .catch(err => console.log(err))

foxdonut added a commit that referenced this issue Aug 11, 2018
@smuemd
Copy link

smuemd commented Aug 11, 2018

@foxdonut
I tested on v 2.0.1 now.
the empty windows are gone (yay!)

But it looks like autorefresh is breaking the tracer anyway.
Here is what I observed

  • When triggering an auto refresh while having the dev tools open in the browser, the tracer freezes.
  • triggering an auto update and opening the dev tools afterwards, everything is fine.

@foxdonut
Copy link
Owner Author

@smuemd would you mind testing with v 2.0.2? Thanks again, much appreciated!

@smuemd
Copy link

smuemd commented Aug 12, 2018

v2.0.2 shows the same behaviour
also closing the dev-tools and refreshing the page manually seems to bring the tracer back to life.

@foxdonut
Copy link
Owner Author

@smuemd thanks! I will look into it.

@foxdonut
Copy link
Owner Author

@smuemd I tried with Wright and it was working well. If auto-refresh with spike is causing problems, as you said best thing is to close devtools and re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants