Search code examples
csstwitter-bootstrapsassbrowserifyvue.js

Accessing global sass variables and bootstrap in .vue files


I need my Vue components to inherit styling and variables from other "global" imports.

I do not want to import variables and bootstrap in every single component, this seems very redundant and not best practice.

It is basic usage so Vue must have made the functionality. I have already attempted to create a base component, an "app.vue" component if you will, that has its own styling that includes the variables and bootstrap, but my components can still not access it.

Any idea?


Solution

  • I know of no other way than @import the variables file in each component. Much like we have to import/require the npm libs we use in each component.