Blame view

build/webpack.dist.dev.config.js 817 Bytes
5e8a2915   jingsam   add umd library b...
1
2
  var path = require('path');

  var webpack = require('webpack');

c9c5e751   huixisheng   [change] optimize...
3
4
  var merge = require('webpack-merge')

  var webpackBaseConfig = require('./webpack.base.config.js');

5e8a2915   jingsam   add umd library b...
5
  

c9c5e751   huixisheng   [change] optimize...
6
  module.exports = merge(webpackBaseConfig, {

5e8a2915   jingsam   add umd library b...
7
8
9
10
11
12
13
14
15
16
17
      entry: {

          main: './src/index.js'

      },

      output: {

          path: path.resolve(__dirname, '../dist'),

          publicPath: '/dist/',

          filename: 'iview.js',

          library: 'iview',

          libraryTarget: 'umd',

          umdNamedDefine: true

      },

e1134de2   jingsam   not bundle vue in...
18
      externals: {

8879f859   jingsam   fixed umd
19
20
21
22
23
24
          vue: {

              root: 'Vue',

              commonjs: 'vue',

              commonjs2: 'vue',

              amd: 'vue'

          }

e1134de2   jingsam   not bundle vue in...
25
      },

5e8a2915   jingsam   add umd library b...
26
27
28
29
30
31
32
      plugins: [

          new webpack.DefinePlugin({

              'process.env': {

                  NODE_ENV: '"development"'

              }

          })

      ]

c9c5e751   huixisheng   [change] optimize...
33
  });