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

using import not working #6

Open
bshconversio opened this issue Jul 26, 2020 · 3 comments
Open

using import not working #6

bshconversio opened this issue Jul 26, 2020 · 3 comments

Comments

@bshconversio
Copy link

bshconversio commented Jul 26, 2020

i am try to use of flexmasonary using

import FlexMasonry from 'flexmasonry';

can i know why it's not working.i don't have enough knowladge of npm and all.But one of my friend checked your package.json file and he changed below things.

from

"main": "dist/flexmasonry.js",

to

"main": "src/flexmasonry.js",

and after it's working.but still i don't know how to import css.

@guandai
Copy link

guandai commented Nov 29, 2020

may be you can import the scss directly , something like:
@import '~flexmasonry/dist/flexmasonry'

How to import SCSS from node_modules?

@ayushsharma82
Copy link

ayushsharma82 commented Jan 20, 2022

@guandai I think @bshconversio meant usage of FlexMasonry in javascript using webpack / bundler.

@caseyalee
Copy link

I had the same problem. Ended up using:
import FlexMasonry from 'flexmasonry/src/flexmasonry.js';

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

4 participants