Typescript eot文件中的SyntaxError,带有文件加载器和网页包
我试图在Next.js(TypeScript)中使用React Rainbow组件,但无法导入字体,因此我使用了带有Typescript eot文件中的SyntaxError,带有文件加载器和网页包,typescript,webpack,next.js,urlloader,react-rainbow-components,Typescript,Webpack,Next.js,Urlloader,React Rainbow Components,我试图在Next.js(TypeScript)中使用React Rainbow组件,但无法导入字体,因此我使用了带有url加载程序的webpack 由于某些原因,我不断收到错误SyntaxError:无效或意外的令牌错误-D:\Git Repository\project\node\u modules\react rainbow components\components\Application\font\Lato Black\Lato Black。eot:1��☺ 在eot文件中使用字体 这是
url加载程序的webpack
由于某些原因,我不断收到错误SyntaxError:无效或意外的令牌错误-D:\Git Repository\project\node\u modules\react rainbow components\components\Application\font\Lato Black\Lato Black。eot:1��☺代码>
在eot文件中使用字体
这是我在next.config.js
中的网页配置:
module.exports = {
webpack: (config, options) => {
config.module.rules.push({
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
use: [
{
loader: 'url-loader?limit=100000'
},
],
})
return config
},
}
知道我做错了什么吗?还是字体本身有问题?版本中已经解决了这一问题,如果您将react rainbow components
的版本更新到v1.24.1,字体将被移动到CDN。这是发行说明