Nuxt.js: vue + jsx, webpack hot reload issue

Created on 13 Feb 2017  Â·  5Comments  Â·  Source: nuxt/nuxt.js

Hi,

I had the next case today.
Here is my module:

<script>
    import Currency from '~components/currency.vue';

    export default {
        props: ['installment'],
        computed: {
            classObject: function () {
                return {
                    'alert-danger': this.installment.status === 'DUE',
                    'alert-success': this.installment.status === 'PAID',
                    'alert-info': this.installment.status === 'PENDING'
                };
            }
        },
        methods: {
            async pay () {
                this.$store.commit('PAY_INSTALLMENT');
                this.$store.commit('SET_STATUS', 'CONFIRMED');
            }
        },
        render(h) {
            return (
                    <div class={{ ...{ 'alert': true, 'col-md-2': true }, ...this.classObject }}>
                        {this.installment.label}
                        <Currency value={this.installment.amount}></Currency>
                        { this.installment.status === 'DUE' ?
                                <input class="btn btn-default" type="button" onClick={this.pay} value="Pay"/> : '' }
                    </div>
            )
        }
    }
</script>

After, I've updated the classObject function. At the browser console it says:
image

However, the actual application was not updated. I need to refresh the page. I have no idea if it could be "fixed" somehow, but it would be really nice to have the hot reload for the jsx applications.

This bug report is available on Nuxt.js community (#c211)
available soon bug-confirmed

Most helpful comment

It will be fixed in the next release.

All 5 comments

@PavelPolyakov I think not only on .jsx files this happens, also in .vue files. I experience after the last release on added middleware that I have to stop/start the npm run dev very often, even if I only change some minor code inside a method or computed property inside of my pages/components. @alexchopin is this something you experienced as well?

It will be fixed in the next release.

The 0.10 release it out ✋

Hi,

I just had the same issue with 1.0.0-rc3. If I change the content within the <template> I get the following log in the browser:

[HMR] bundle rebuilding
[HMR] bundle rebuilt in 964ms
[HMR] Checking for updates on the server...
[HMR] Nothing hot updated.
[HMR] App is up to date.

Regardless what I change in the .vue file I have to restart npm run dev manually.

Any ideas?

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikekidder picture mikekidder  Â·  3Comments

gary149 picture gary149  Â·  3Comments

msudgh picture msudgh  Â·  3Comments

vadimsg picture vadimsg  Â·  3Comments

bimohxh picture bimohxh  Â·  3Comments