无法加载字体webpack和angular2

时间:2017-01-21 13:22:20

标签: angular webpack

我的应用程序angular2-webpack中包含字体有问题,我已下载此启动器: https://github.com/AngularClass/angular2-webpack-starter, 但现在当我尝试添加:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<canvas id='canv'></canvas>

webpack编译器返回以下错误:

@font-face {
    font-family: 'SuperMarioBros';
    src: url('./SuperMarioBros.eot');
    src: local('SuperMarioBros'), url('./SuperMarioBros.woff') format('woff'), url('./SuperMarioBros.ttf') format('truetype');
}

在我的 webpack.config.js 中,我有这个加载器:

./src/assets/fonts/super_mario/SuperMarioBros.eot
Module parse failed: C:\Users\Lorenzo\Desktop\lorenzo\src\assets\fonts\super_mario\SuperMarioBros.eot Unexpected character '�' (1:0)

./src/assets/fonts/super_mario/SuperMarioBros.woff
Module parse failed: C:\Users\Lorenzo\Desktop\lorenzo\src\assets\fonts\super_mario\SuperMarioBros.woff Unexpected character ' '

./src/assets/fonts/super_mario/SuperMarioBros.ttf
Module parse failed: C:\Users\Lorenzo\Desktop\lorenzo\src\assets\fonts\super_mario\SuperMarioBros.ttf Unexpected character ' '

0 个答案:

没有答案