Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config-css can't load fontawesome.css #6

Closed
khenderick opened this issue Aug 3, 2016 · 1 comment
Closed

config-css can't load fontawesome.css #6

khenderick opened this issue Aug 3, 2016 · 1 comment

Comments

@khenderick
Copy link

In my package.json, "font-awesome": "^4.6.3" is a dependency and "@easy-webpack/config-css": "^2.3.2" is a devDependency. Both dev and prod have require('@easy-webpack/config-css')({ filename: 'styles.css', allChunks: true, sourceMap: false }) in the webpack.config.js

As my splash screen uses font-awesome, I have to require font-awesome's css file in my html's head.

...
<head>
    <title><%= webpackConfig.metadata.title %></title>
    ...
    <link rel="stylesheet" href="<%= require('font-awesome/css/font-awesome.css') %>"/>
   ...
</head>
<body>
   ...
   <i class="fa fa-spinner fa-spin text-center"></i>
...

However, this raises following error during npm start:

Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plug  in, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example

That page refers me to the fact that you should have the right plugins loaded etc, but that's what I expect config-css to do for me. Any thoughts?

@niieani
Copy link
Contributor

niieani commented Aug 3, 2016

No need to add any <link rel> to your index.html. In Webpack, we use loaders, and config-css uses one. All you need to do is import 'font-awesome/css/font-awesome.css' in one of your entry files, such as main.js.

@niieani niieani closed this as completed Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants