webpack.dev.config.js 495 B

12345678910111213141516171819202122232425262728
  1. var path = require('path')
  2. var webpack = require('webpack')
  3. module.exports = {
  4. entry: './src/index',
  5. output: {
  6. path: path.resolve(__dirname, '../dist'),
  7. filename: 'vue.js',
  8. library: 'Vue',
  9. libraryTarget: 'umd'
  10. },
  11. module: {
  12. loaders: [
  13. { test: /\.js$/, loader: 'babel' }
  14. ]
  15. },
  16. babel: {
  17. loose: 'all'
  18. },
  19. plugins: [
  20. new webpack.DefinePlugin({
  21. 'process.env': {
  22. NODE_ENV: '"development"'
  23. }
  24. })
  25. ],
  26. devtool: 'source-map'
  27. }