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

flashy is not defined #4

Open
mdeherder opened this issue May 16, 2021 · 1 comment
Open

flashy is not defined #4

mdeherder opened this issue May 16, 2021 · 1 comment

Comments

@mdeherder
Copy link

mdeherder commented May 16, 2021

Hello,
If I activate the option :

script_attributes:
        defer: true

in webpack_encore.yaml,

i get the following error when the page loads and a flash message should be displayed:

Uncaught ReferenceError: flashy is not defined

If I remove the 'defer' option the flashy message is correctly displayed.

Symfony 5.3.0-BETA4 and mercuryseries/flashy-bundle 4.0.0

@rimoi
Copy link

rimoi commented Oct 21, 2021

When including the library in your app.js file, you have to make globale flashy, like this :

import flashy from "./flashy";
window.flashy = flashy;

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