gilbitron / flexmasonry

A lightweight masonry (cascading grid layout) library powered by flexbox.
https://flexmasonry.now.sh
MIT License
436 stars 25 forks source link

using import not working #6

Open bshconversio opened 4 years ago

bshconversio commented 4 years ago

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 commented 3 years ago

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

How to import SCSS from node_modules?

ayushsharma82 commented 2 years ago

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

caseyalee commented 2 years ago

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