Open moracabanas opened 5 years ago
+1
Hi, I had the same problem. I needed to use external styles and fonts from another project and here is the solution to bypass the webpack/CLI way of handling thing (checks every path etc...).
The only way i've found is to add a link tag in the index.html (in "public" folder): Note: It's important to include a "type" and a "rel" attribute:
Example:
mounted () {
var head = document.getElementsByTagName('HEAD')[0];
// Create new link Element
var link = document.createElement('link');
// set the attributes for link element
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'rsc/contrib/css/particuliers/base.css';
}
+1
No matter how I try to import .css file with fonts on app.vue it doesn't work.
Im following this example from vue.app from https://github.com/vuejs-templates/webpack/issues/604#issuecomment-287620657:
When I try to build the project It shows the error:
Also I installed sass-loader and node-sass as suggested on Vue documentation: https://cli.vuejs.org/guide/css.html#pre-processors