我正在尝试使用汇总构建我的组件库,但是它不喜欢我的字体文件。
\n[!] Error: Unexpected character '' (Note that you need plugins to import files that are not JavaScript)\nsrc/fonts/dancing/Dancing_Script-400-vietnamese1.woff2 (1:4)\n1: wOF2\xef\xbf\xbd"\xef\xbf\xbdZ?STAT*\xef\xbf\xbd8hello everyone.\nRun Code Online (Sandbox Code Playgroud)\n在过去的几个小时里我一直在尝试解决这个问题,但在搜索中找不到太多帮助。\n我尝试使用 url 插件来解决它,但我遇到了其他错误:
\n[!] Error: You must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks. \nError: You must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks.\nRun Code Online (Sandbox Code Playgroud)\n这是我的汇总配置
\nimport peerDepsExternal from 'rollup-plugin-peer-deps-external'\nimport resolve from '@rollup/plugin-node-resolve'\nimport commonjs from '@rollup/plugin-commonjs'\nimport typescript from 'rollup-plugin-typescript2'\nimport image from '@rollup/plugin-image'\nimport url …Run Code Online (Sandbox Code Playgroud)