Blame view

build/webpack.dist.dev.config.js 883 Bytes
4a7f28fd   Sergio Crisostomo   eslint and replac...
1
2
3
4
  const path = require('path');

  const webpack = require('webpack');

  const merge = require('webpack-merge');

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

5e8a2915   jingsam   add umd library b...
5
  

1f9fbacf   Clark Du   add eslint config...
6
  process.env.NODE_ENV = 'production';

676cdf84   huixisheng   fixed webpack bui...
7
  

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

5e8a2915   jingsam   add umd library b...
9
10
11
12
13
14
15
16
17
18
19
      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...
20
      externals: {

8879f859   jingsam   fixed umd
21
22
23
24
25
26
          vue: {

              root: 'Vue',

              commonjs: 'vue',

              commonjs2: 'vue',

              amd: 'vue'

          }

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

5e8a2915   jingsam   add umd library b...
28
      plugins: [

676cdf84   huixisheng   fixed webpack bui...
29
          // @todo

5e8a2915   jingsam   add umd library b...
30
31
          new webpack.DefinePlugin({

              'process.env': {

676cdf84   huixisheng   fixed webpack bui...
32
                  NODE_ENV: '"production"'

5e8a2915   jingsam   add umd library b...
33
34
35
              }

          })

      ]

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