.vue-css.The Vue.js plugin generated by @nxtchg, vue-css is produced stashing pertinent CSS along with.vue parts, allowing you to pack CSS documents along with your elements.Vue components ought to be stand-alone units along with every little thing pertinent ingrained inside. However, Vue does not assist ingrained types. You can easily use Webpack or Browserify, however if you don’t intend to, then there is no suited solution.
This plugin inserts on its own in addition to Vue.component() and also if there is actually a “style” member existing in element’s definition, it incorporates it to the webpage. All CSS selectors are actually prefixed along with the name of the component to stay away from disputes.The CSS selectors are prefixed along with the title of the component, as an example:.Vue.component(‘ my-component’,.theme: ‘Hi there, planet!’,.design: ‘span,.this-too font-color: reddish ‘. ).The above configuration will add.my-component span,.my-component.
this-too font-color: reddish to the page.Consumption.The plugin could be made use of simply by including the ‘vue-css. js’ data into your task.That’s it give vue-css a try if you are trying to find a different way to assist embedded types in your projects.