Replies: 3 comments 3 replies
-
Hi @osimosu ! You should not import it into the theme.css file but in the source /src/scss/theme.scss For example, add this: than add this variable/value to src/scss/themes/base/_variables-theme.scss: |
Beta Was this translation helpful? Give feedback.
-
Actually, that was a typo. I did import the local font in theme.scss: @import "../font/myfont/stylesheet.css"; Then i modified the gulp task dist-assets to copy it to dev folder: This works during development (npm run watch). The issue arise when trying to build for prod (npm run build). Maybe you could show an example of importing font from local folder (not from url). |
Beta Was this translation helpful? Give feedback.
-
Can you run "npm run prod-copy" after "npm run build-dev"? That just copies everything from dev -> public. |
Beta Was this translation helpful? Give feedback.
-
Hi!
Great work on this project. I'm mainly a backend developer and this project is great for quickly designing a landing page.
One issue I've been struggling with is how to add a locally imported font as I'm not too familiar with gulp.
What I've done is;
Added a new font folder under src: \src\font\myfont\stylesheet.css
Then import in theme.css: @import "../font/myfont/stylesheet.css";
In the gulp.js, I also added this in the dist-assets task:
gulp.src('./src/font/**')
.pipe(gulp.dest('./dev/font'));
The problem is when building for prod: I get the error
'minify-css' errored after 426 ms
[08:08:54] Error: Ignoring local @import of "../font/myfont/stylesheet.css" as resource is missing.
Any tips and maybe add support for it ?
Beta Was this translation helpful? Give feedback.
All reactions