webpack.config.umd.js 626 B

1234567891011121314151617181920212223242526272829303132333435
  1. var path = require('path')
  2. var webpack = require('webpack')
  3. module.exports = {
  4. entry: './index.js',
  5. output: {
  6. path: path.resolve(__dirname, './dist'),
  7. filename: 'vuecodemirror.min.js',
  8. library: 'VueCodeMirror',
  9. libraryTarget: 'umd',
  10. umdNamedDefine: true
  11. },
  12. module: {
  13. loaders: [
  14. {
  15. test: /\.vue$/,
  16. loader: 'vue-loader'
  17. },
  18. {
  19. test: /\.css$/,
  20. loader: 'style-loader!css-loader'
  21. }
  22. ]
  23. },
  24. externals: {
  25. vue: 'Vue'
  26. },
  27. plugins: [
  28. new webpack.optimize.UglifyJsPlugin({
  29. compress: {
  30. warnings: false
  31. }
  32. })
  33. ]
  34. }