-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.2.5 Dev Release: Runs icon path and pre-pended publicPath through a…
… path.normalize, updates README.md to fix typos and better example for basic configuration. Add new mixed-path test to better test different pathing purmutations all resolve.
- Loading branch information
Devin
committed
Jan 17, 2022
1 parent
9adbbbb
commit 5e94738
Showing
4 changed files
with
102 additions
and
9 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
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
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
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,60 @@ | ||
const WebpackFavicons = require('../index.js'); | ||
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
entry: path.resolve(__dirname, 'test.js'), | ||
output: { | ||
path: path.resolve(__dirname, '../dist/mixed'), | ||
publicPath: '/~media/', | ||
filename: 'test.js', | ||
pathinfo: false | ||
}, | ||
module: { | ||
rules: [{ | ||
'test': /\.html$/, | ||
'exclude': /node_modules/, | ||
'include': [ | ||
path.resolve(__dirname, 'test.html') | ||
], | ||
'use': { | ||
'loader': 'html-loader', // (see: https://www.npmjs.com/package/html-loader) | ||
'options': { 'minimize': false } | ||
} | ||
}] | ||
}, | ||
optimization: { | ||
minimize: false | ||
}, | ||
plugins: [ | ||
new CleanWebpackPlugin({ | ||
'cleanOnceBeforeBuildPatterns': [path.resolve(__dirname, '../dist/mixed')] | ||
}), | ||
new HtmlWebpackPlugin({ | ||
'title': 'Basic Test', | ||
'template': './test/test.html', | ||
'filename': './test.html', | ||
'minify': false | ||
}), | ||
new WebpackFavicons({ | ||
'src': 'assets/favicon.svg', | ||
'path': 'assets', | ||
'background': '#000', | ||
'theme_color': '#000', | ||
'icons': { | ||
'android': false, | ||
'appleIcon': false, | ||
'appleStartup': false, | ||
'coast': false, | ||
'favicons': true, | ||
'firefox': false, | ||
'opengraph': false, | ||
'twitter': false, | ||
'yandex': false, | ||
'windows': false | ||
} | ||
}) | ||
] | ||
}; | ||
|