gaelreyrol / materialize-loader

A webpack loader for Materialize Css Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack dumps font files in root dir

leccles1 opened this issue · comments

So I've recently began using the materialize-loader after struggling to find a way to easily add materializecss into my web apps.

One thing I've noticed is that after running webpack it dumps the font files (.woff, .woff2) in the root directory. I thought maybe if I put my materialize.config.js & materialize.config.scss into a directory (materialize-config/) and edit my webpack entry to be

entry: [
 'script!jquery/dist/jquery.min.js',
 'materialize-loader!./materialize-config/materialize.config.js',
 './app/app.jsx'
], 

it would dump the font files into there, however this was not the case.

Is there currently a config option to define a folder to put the fonts into?

Hi,

The fonts are managed by the file-loader and the url-loader, you can configure output folder with the output object in your webpack configuration -> https://webpack.js.org/configuration/output.

Great, thanks for the link will take a look into it :)