No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

46 líneas
1.0 KiB

  1. const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  2. const webpack = require('webpack')
  3. const libraryName = 'vue-masonry-plugin'
  4. const buildTarget = process.env.TARGET === 'umd' ? 'umd' : 'window'
  5. const outputFile = `${libraryName}-${buildTarget}.js`
  6. const tagline = 'Vue.js plugin for Masonry layouts'
  7. module.exports = {
  8. entry: './index.js',
  9. module: {
  10. rules: [
  11. {
  12. test: /\.js$/,
  13. exclude: /node_modules/,
  14. loader: 'babel-loader',
  15. query: {
  16. presets: ['@babel/preset-env']
  17. }
  18. }
  19. ]
  20. },
  21. output: {
  22. path: __dirname + '/dist',
  23. filename: outputFile,
  24. library: libraryName,
  25. libraryTarget: buildTarget,
  26. umdNamedDefine: true
  27. },
  28. mode: 'production',
  29. optimization: {
  30. minimizer: [
  31. new UglifyJsPlugin({
  32. uglifyOptions: {
  33. output: {comments: new RegExp(tagline, 'i')}
  34. }
  35. })
  36. ]
  37. },
  38. plugins: [
  39. new webpack.BannerPlugin({
  40. banner: `${tagline} \n https://github.com/shershen08/vue-masonry/ \n file:[file]`
  41. })
  42. ]
  43. }