问题描述
我创建一个faststart Webpack构建。我正在使用手写笔+哈巴狗,并且我需要图标的webfont插件。我需要使用mixin在触控笔文件中@extend一些图标,这就是为什么我需要在main.styl中包括生成的icons.styl。由插件“ WebfontPlugin”生成的Icons.styl。带有默认触控笔加载器的触控笔。我将icons.styl放入带有手写笔文件的文件夹中,然后导入,但出现错误。
https://github.com/Venegrad/venkit/tree/webpack
图标生成的代码插件:
new WebfontPlugin({
files: path.resolve(__dirname,"src/svg**/*.svg"),fontName: "i",formats: ["woff2"],template: path.resolve(__dirname,"src/svg/template/icons.styl"),dest: path.resolve(__dirname,"src/fonts/"),destTemplate: path.resolve(__dirname,"src/styl/framework"),}),
手写笔选项:
const stylusOptions = {
use: ["nib"],import: ["nib"],includeCSS: true,resolveURL: true,hoistAtrules: true,compress: !isDev,hmr: true,};
路径:
图标模板-src/svg/template/icons.styl
主笔输入-src/styl/framework/main.styl
由插件文件-src/styl/framework/icons.styl
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)