You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

webpack.js 491B

1234567891011121314151617181920212223242526
  1. const path = require('path')
  2. module.exports = {
  3. entry: {
  4. 'weather-status': path.join(__dirname, 'src', 'weather-status'),
  5. },
  6. output: {
  7. path: path.resolve(__dirname, './js'),
  8. publicPath: '/js/',
  9. filename: '[name].js?v=[chunkhash]',
  10. jsonpFunction: 'webpackJsonpWeatherStatus',
  11. },
  12. optimization: {
  13. splitChunks: {
  14. automaticNameDelimiter: '-',
  15. },
  16. },
  17. module: {
  18. rules: [
  19. {
  20. test: /\.(png|jpg|gif|svg|woff|woff2|eot|ttf)$/,
  21. loader: 'url-loader',
  22. },
  23. ],
  24. },
  25. }