2
0
mirror of https://github.com/tenrok/vue-native-websocket.git synced 2026-06-19 17:30:35 +03:00

babel 6 to 7, webpack 3 to 5 etc

This commit is contained in:
nsano-rururu
2022-07-19 00:24:36 +09:00
parent c7c54f86c9
commit 0a8d53a5e3
13 changed files with 16201 additions and 9727 deletions
+9 -14
View File
@@ -1,36 +1,31 @@
var path = require('path')
var webpack = require('webpack')
const TerserPlugin = require('terser-webpack-plugin')
module.exports = {
entry: ['./src/Main.js'],
mode: 'production',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'build.js',
library: ['VueNativeSock'],
libraryTarget: 'umd'
},
devtool: "source-map",
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
],
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
}
},
module: {
loaders: [
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
use: ['babel-loader']
}
]
}