Skip to content

turbolinks:load not working in PROD #27

Open
@navjeetc

Description

@navjeetc

My vue entrypoint js file that creates my vue component is surrounded by the code

document.addEventListener('turbolinks:load')

and this works fine in development mode but on production model the vue component is not created and I see a blank screen. But if I change that code to:

document.addEventListener('DOMContentLoaded')

then it works (vue component template is rendered) in production but in development it is only loaded first time but when I navigate to other parts of the site and come back the vue component is not rendered blank screen).

Is there something wrong with my code or turbolinks settings? Why does turbolinks:load not work in production?

I am using vueonrails version 1.0.0, rails 5.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions