-
-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example of multiple invocations of the plugin
- Loading branch information
Showing
6 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "favicons-multiple-example", | ||
"version": "1.0.0", | ||
"description": "Demo of favicons webpack plugin", | ||
"scripts": { | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "MIT" | ||
} |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Home</title> | ||
</head> | ||
|
||
<body> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const { resolve } = require('path'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const FaviconsWebpackPlugin = require('../../src/'); | ||
|
||
const webpack = require('webpack'); | ||
|
||
module.exports = (env, args) => { | ||
return { | ||
context: __dirname, | ||
entry: './src/app.js', | ||
output: { | ||
path: resolve(__dirname, 'public'), | ||
filename: 'app.js', | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
filename: 'index.html', | ||
template: './src/index.html', | ||
}), | ||
new FaviconsWebpackPlugin({ | ||
logo: './src/favicon.png', | ||
favicons: { | ||
icons: { | ||
favicons: true, | ||
android: false, | ||
appleIcon: false, | ||
appleStartup: false, | ||
windows: false, | ||
yandex: false, | ||
}, | ||
} | ||
}), | ||
new FaviconsWebpackPlugin({ | ||
logo: './src/favicon.svg', | ||
prefix: 'assets2/', | ||
outputPath: 'assets2/', | ||
favicons: { | ||
icons: { | ||
favicons: false, | ||
android: false, | ||
appleIcon: true, | ||
appleStartup: false, | ||
windows: false, | ||
yandex: false, | ||
}, | ||
} | ||
}), | ||
], | ||
stats: "errors-only" | ||
}; | ||
} |