Skip to content

Instantly share code, notes, and snippets.

@romerocs
Created February 20, 2020 20:34
Show Gist options
  • Save romerocs/7db2bea3ad9869532db3d9ee3532c004 to your computer and use it in GitHub Desktop.
Save romerocs/7db2bea3ad9869532db3d9ee3532c004 to your computer and use it in GitHub Desktop.
Webpack config for resolving font files in css without copying to the dist folder
module.exports = {
module: {
rules: [
{
test: /.(otf|eot|ttf|woff|woff2|svg)(\?\S*)?$/,
loader: "file-loader",
options: {
publicPath: "../../",
name: "./[path][name].[ext]",
emitFile: false
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment