Meteor 1.3 Scss imports from node_modules experiment

Do you remember about this issue: https://github.com/meteor/meteor/issues/6037 ?

I’ve played with something like this: https://github.com/juliancwirko/meteor-bootstrap-postcss-test

The example uses Bootstrap 4 with Scss from Npm package. I use PostCSS plugins to compile Scss files from Bootstrap. I don’t need fourseven:scss package here. And of course I can import .scss files from node_modules now.

You can go through the files to see how it works.

Unfortunatelly it won’t work with Foundation 6 (for now), this is because F6 uses complicated mixins structure and I can’t make it work with postcss-sassy-mixins plugin :confused: I’ll keep trying.

Fun and weird stuff but it works for Bootstrap and probably for many other libs out there :smiley:

1 Like

We’re doing something similar but with npm run scripts

So we can override bootstrap sass variables and just import the bits we need, from the node_modules dir. It’s working well for us. Your milage may vary. We use npm scripts for our non-meteor projects so the improved npm support in meteor seems to be a huge win.

2 Likes

From Meteor 1.3.2 it should work, here is an example: https://github.com/juliancwirko/meteor-npm-foundation-test (Meteor 1.3.2-rc.0)

2 Likes