Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
✨ Add file-loader (#20)
Browse files Browse the repository at this point in the history
* added file-loader

* added fonts to file-loader

* fixed pr checks
  • Loading branch information
ljmerza authored and erickzhao committed Oct 9, 2019
1 parent 717862a commit e213119
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
85 changes: 85 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"eslint": "^5.5.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.14.0",
"file-loader": "^3.0.1",
"glob": "^7.1.3",
"html-webpack-plugin": "^3.0.0",
"http-server": "^0.11.1",
Expand Down
21 changes: 21 additions & 0 deletions webpack.config.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,27 @@ module.exports = {
test: /\.html$/,
loader: 'raw-loader',
},
{
test: /\.(pdf|gif|png|jpe?g|svg)$/,
use: [
{
loader: 'file-loader',
options: {
outputPath: 'static/',
},
},
],
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
},
}],
},
],
},
plugins: [
Expand Down

0 comments on commit e213119

Please sign in to comment.