Closed zgstyle closed 7 years ago
Hello, I am trying to get scss from it using the following configs: webpack.config.js:
webpack.config.js
var ROOT = path.resolve(__dirname, 'web/assets/mail'); var config = { module: { ... rules: [ { test: /\.font\.(js|json)$/, include: PATH.FONTS, use: [ { loader: 'css-loader' }, { loader: 'sass-loader' }, { loader: 'webfonts-loader', options: { fileName: "../fonts/[fontname].[ext]" } } ] } ] }}; module.exports = config;
and fonticon.font.js:
fonticon.font.js
var path = require('path'); module.exports = { css: true, cssTemplate: path.resolve('node_modules/webfonts-generator/templates/scss.hbs'), files: [ "./ifi/*.svg" ], // "dest": "../fonts", fontName: "ificons", cssFontsUrl: "/assets/mail/fonts/", classPrefix: "ifi-", baseClass: "ifi", fixedWidth: true, types: ["ttf", "woff", "woff2"] };
It generates required .ttf, woff and wooff2 files, but NO SASS.
Wrong place to raise this issue, as it will be answered at actual loader's repo (which you are using): https://github.com/jeerbl/webfonts-loader. Please close this one.
Sorry!
Hello, I am trying to get scss from it using the following configs:
webpack.config.js
:and
fonticon.font.js
:It generates required .ttf, woff and wooff2 files, but NO SASS.