Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack webfont style.css和手写笔文件的网页包问题_Webpack_Stylus - Fatal编程技术网

Webpack webfont style.css和手写笔文件的网页包问题

Webpack webfont style.css和手写笔文件的网页包问题,webpack,stylus,Webpack,Stylus,Im创建一个faststart网页包构建。我使用手写笔+帕格,我需要webfont插件的图标。我需要使用mixin在手写笔文件中@extend一些图标,这就是为什么我需要在main.styl中包含生成的icons.styl。Icons.styl由插件“WebfontPlugin”生成。具有默认手写笔加载程序的手写笔。我将icons.styl放在包含手写笔文件的文件夹中,然后导入它,但出现了一个错误 图标生成代码插件: new WebfontPlugin({ files: path.

Im创建一个faststart网页包构建。我使用手写笔+帕格,我需要webfont插件的图标。我需要使用mixin在手写笔文件中@extend一些图标,这就是为什么我需要在main.styl中包含生成的icons.styl。Icons.styl由插件“WebfontPlugin”生成。具有默认手写笔加载程序的手写笔。我将icons.styl放在包含手写笔文件的文件夹中,然后导入它,但出现了一个错误

图标生成代码插件:

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