webpack.config.js 959 B

12345678910111213141516171819202122232425262728293031323334
  1. const Path = require('path')
  2. const HtmlWebpackPlugin = require('html-webpack-plugin')
  3. const LiveReloadPlugin = require('webpack-livereload-plugin')
  4. const WebpackPwaManifest = require('webpack-pwa-manifest')
  5. module.exports = {
  6. entry: './src/index.js',
  7. mode: process.env.NODE_ENV || 'development',
  8. devServer: {
  9. contentBase: Path.join(__dirname, 'dist')
  10. },
  11. plugins: [
  12. new HtmlWebpackPlugin({
  13. meta: {viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no'}
  14. }),
  15. new WebpackPwaManifest({
  16. name: 'CHANGEME',
  17. short_name: 'changeme',
  18. description: 'This is an installable app.',
  19. background_color: '#ffffff',
  20. icons: [
  21. {
  22. src: Path.resolve('src/assets/placeholder_icon.png'),
  23. sizes: [96, 128, 192, 256, 384, 512]
  24. }
  25. ],
  26. inject: true,
  27. orientation: 'omit'
  28. }),
  29. new LiveReloadPlugin({
  30. appendScriptTag: true
  31. })
  32. ]
  33. }