Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Adding stencil-router breaks hot reloading #1

Open
shendrick opened this issue Nov 8, 2017 · 3 comments
Open

Adding stencil-router breaks hot reloading #1

shendrick opened this issue Nov 8, 2017 · 3 comments

Comments

@shendrick
Copy link

Resources:
Before submitting an issue, please consult our docs.

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

 insert the output from npm list @stencil/core here

@stencil/[email protected]

I'm submitting a ... (check one with "x")
[X ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior:
I added the stencil router and when running the dev server and making a change. Bundle rebuilds fine. Then hot reloading breaks, I get a white screen and I get this console error...

Uncaught SyntaxError: Unexpected token < ... build/app/undefined:1

If I stop and restart with npm start, everything is fine again.

Expected behavior:
Should hot reload when using stencil router

Steps to reproduce:
The issue seemed to start when I added in stencil router.

Related code:

insert any relevant code here

Other information:

@shendrick
Copy link
Author

shendrick commented Nov 8, 2017

Now I seem to also get this error when rebuilding on every other save.

[49:07.0]  compile finished in 1.40 s

[ ERROR ]  typescript: src/store/index.ts, line: 3
           Cannot find module 'redux-logger'.

      L2:  import thunk from 'redux-thunk';
      L3:  import logger from 'redux-logger';
      L4:  import rootReducer from '../reducers/index';

save once and it happens, second time with a trivial save and works fine, then repeats.

@shendrick
Copy link
Author

So it seems like the hot loading issue was related to core and an update fixed that. The redux logger error happening on every other save however, is still happening.

@shendrick
Copy link
Author

shendrick commented Nov 12, 2017

Hmm.. looks like there's an error in the console if you change the input then go to another page using the router, go back then try changing the input again. It can't seem to find the elm var.

app.core.js:1092 Uncaught (in promise) TypeError: Cannot read property '_values' of null
    at setValue (app.core.js:1092)
    at Page1.setComponentProp (app.core.js:1049)
    at app.core.js:153
    at Array.forEach (<anonymous>)
    at _mapStateToProps (app.core.js:151)
    at app.core.js:157
    at dispatch (home-page.js:481)
    at home-page.js:807
    at home-page.js:69
    at step (home-page.js:61)

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

No branches or pull requests

1 participant