2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

Bump dev dependencies (webpack 4, babel 7, etc), replace build files by webpack config, use webpack-dev-server

This commit is contained in:
yamsellem
2019-01-15 19:26:38 +01:00
parent 623df819ae
commit 09165c4a0a
18 changed files with 194 additions and 513 deletions
+11 -30
View File
@@ -1,32 +1,13 @@
const webpack = require('webpack')
const base = require('./webpack.base.conf')
const config = require('../config')
var merge = require('webpack-merge')
base.entry = {
lib: './src/index.js'
}
var baseWebpackConfig = require('./webpack.base.conf')
base.output = {
path: config.build.assetsRoot,
publicPath: config.build.assetsPublicPath,
filename: 'vue-select.js',
library: 'VueSelect',
libraryTarget: 'umd'
}
var webpackConfig = Object.assign({}, base)
webpackConfig.devtool = '#source-map'
webpackConfig.plugins = (webpackConfig.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: { warnings: false }
}),
new webpack.optimize.OccurenceOrderPlugin(),
])
module.exports = webpackConfig
module.exports = merge(baseWebpackConfig, {
entry: './src/index.js',
output: {
filename: 'vue-select.js',
library: 'VueSelect',
libraryTarget: 'umd',
globalObject: "typeof self !== 'undefined' ? self : this"
}
});