a webpack plugin for automatically creating apple touch icons and launch screens
npm install apple-touch-icons-webpack-pluginA Webpack Plugin for automatically creating apple touch icons and launch screens
npm install --save-dev apple-touch-icons-webpack-plugin
`Note: This plugin requires Webpack 4.0.0 and above.
Usage
#### Webpack Config
Update plugins array in webpack.config.js
`javascript
// all options
// *sizes is a list ie. [[h,w],[h,w],[h,w,]]
// *launch_screen_sizes is a list ie. [[h,w],[h,w]] that is matched to the launch_screen option index
// icon and launch_screen are optional; defaults to see below, ie. if options are null
// "apple-touch-icon.png", "launch_screen_portrait.png","launch_screen_landscape.png", "ipad.png" are expected to be somewhere in the path
// 'resize' can be fit, fill or crop (crop resizes then crops the image)
const AppleTouchIconsPlugin = require('apple-touch-icons-webpack-plugin')options = {
icon: "apple-touch-icon.png",
launch_screen: ["launch-screen-portrait.png","launch-screen-landscape.png"],
ipad: "ipad.png",
icon_sizes: [[57, 57],[72, 72],[76, 76],[114, 114],[120, 120],[152, 152],[167, 167],[180, 180], [1024,1024]],
launch_screen_sizes: [[481, 1024],[481, 1024]],
ipad_sizes: [[568,320],[667,375],[736,414],[812,375],[1024,768],[834,834], [1024,1024] ],
resize: "crop"
};
module.exports = {
plugins: [
new AppleTouchIconsPlugin(
options,
)
]
}
// minimum options
// "apple-touch-icon.png", "launch-screen-portrait.png","launch-screen-landscape.png","ipad.png" are expected to be somewhere in the path
module.exports = {
plugins: [
new AppleTouchIconsPlugin()
]
}
`#### Html Config
`html
Example Title
``