You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So when I run a build I see Module not found: Error: You attempted to import ../fonts/sourcesanspro-light-webfont.eot which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. You can either move it inside src/, or add a symlink to it from project's node_modules/.
That all makes sense.
I'm curious to know if you've seen something like this before and have a work around for it. I've tried adding a few extra scripts to copy the fonts directory from node_modules into src but of course that doesn't help because the @font-face is still going outside of src.
I can attempt another workaround by only including the .scss that I want from the framework (excluding the fonts) and downloading the fonts and checking them into my repo in the public directory, but wanted to see if I was missing an obvious solution first.
Thanks!
The text was updated successfully, but these errors were encountered:
Sass support will be released in 2.0 (fyi), and the best advice I can give you is just to move your fonts/ folder into src/ -- I'm sorry if this isn't the most terribly helpful answer, but it's our typical response.
Since you require some path trickery, you might have to do the following:
src/assets/css/yourcss.css
src/assets/fonts # the copied fonts
Is there a reason you don't want them in your src/ folder?
I'm in a similar situation, and first thought was to not have them in the src/ directory since they would seem to be more binary assets than text source code.
lockbot
locked and limited conversation to collaborators
Jan 8, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a question, not a bug report.
I'm looking for a little help when it comes to using a CSS preprocessor. I followed the instructions for Sass and everything works as advertised. 👍
My problem is that the framework I'm required to use also includes fonts, and when it imports those fonts it does so like this:
So when I run a build I see
Module not found: Error: You attempted to import ../fonts/sourcesanspro-light-webfont.eot which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. You can either move it inside src/, or add a symlink to it from project's node_modules/.
That all makes sense.
I'm curious to know if you've seen something like this before and have a work around for it. I've tried adding a few extra scripts to copy the fonts directory from
node_modules
intosrc
but of course that doesn't help because the@font-face
is still going outside ofsrc
.I can attempt another workaround by only including the
.scss
that I want from the framework (excluding the fonts) and downloading the fonts and checking them into my repo in thepublic
directory, but wanted to see if I was missing an obvious solution first.Thanks!
The text was updated successfully, but these errors were encountered: