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.
 
 
 
 
 
 

26 regels
599 B

  1. var path = require('path');
  2. var webpack = require('webpack');
  3. var production = process.env.NODE_ENV === 'production' || false;
  4. module.exports = {
  5. entry: './src/lesspass.js',
  6. output: {
  7. filename: production ? 'lesspass.min.js' : 'lesspass.js',
  8. path: path.resolve(__dirname, 'dist'),
  9. library: 'LessPass',
  10. libraryTarget: 'umd'
  11. },
  12. module: {
  13. rules: [
  14. {test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}
  15. ]
  16. },
  17. plugins: production ? [
  18. new webpack.optimize.UglifyJsPlugin({
  19. beautify: false,
  20. comments: false
  21. })
  22. ] : []
  23. };