Resources Loader and Vue Devtools

Learn to import styles or variables using the style resources loader and learn about Vue dev tools.

Automatic import of styles and variables using resources loader

If we’re using a preprocessor and have defined global variables, mixins, and so on, we need to import them into each component where we want to use them. However, it’s very repetitive and tedious to import these files everywhere. To avoid that, we can extend the Vue CLI config and utilize a style-resources-loader plugin to automatically import styles and make them available in every component in our application. First, install the style-resources-loader dependency.

Get hands-on with 1400+ tech skills courses.