mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-05-17 05:39:39 +03:00
39 lines
784 B
JavaScript
Executable File
39 lines
784 B
JavaScript
Executable File
var path = require('path')
|
|
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',
|
|
optimization: {
|
|
minimize: true,
|
|
minimizer: [new TerserPlugin()]
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
}
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['@babel/preset-env'],
|
|
plugins: ['@babel/plugin-transform-runtime']
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|