Skip to content

Commit

Permalink
Merge pull request #13 from edx/djoy/favicon_and_project_root
Browse files Browse the repository at this point in the history
Process favicon.ico and a PROJECT_ROOT fix
  • Loading branch information
davidjoy authored Oct 11, 2019
2 parents a15b795 + 285ab47 commit 914fe0b
Show file tree
Hide file tree
Showing 4 changed files with 399 additions and 9 deletions.
4 changes: 4 additions & 0 deletions config/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ module.exports = Merge.smart(commonConfig, {
test: /\.(woff2?|ttf|svg|eot)(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader',
},
{
test: /favicon.ico$/,
loader: 'file-loader?name=[name].[ext]', // <-- retain original file name
},
{
test: /\.(jpe?g|png|gif|ico)(\?v=\d+\.\d+\.\d+)?$/,
use: [
Expand Down
4 changes: 4 additions & 0 deletions config/webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ module.exports = Merge.smart(commonConfig, {
test: /\.(woff2?|ttf|svg|eot)(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader',
},
{
test: /favicon.ico$/,
loader: 'file-loader?name=[name].[ext]', // <-- retain original file name
},
{
test: /\.(jpe?g|png|gif|ico)(\?v=\d+\.\d+\.\d+)?$/,
use: [
Expand Down
2 changes: 1 addition & 1 deletion lib/paths.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');

module.exports = {
PROJECT_ROOT: process.env.PROJECT_ROOT,
PROJECT_ROOT: process.env.PROJECT_ROOT ? process.env.PROJECT_ROOT : process.cwd(),
BASE_CONFIG_DIR: path.resolve(__dirname, '..', 'config'),
};
Loading

0 comments on commit 914fe0b

Please sign in to comment.