mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-30 19:08:48 +00:00
39 lines
No EOL
953 B
JavaScript
39 lines
No EOL
953 B
JavaScript
const path = require('path');
|
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
|
|
|
module.exports = {
|
|
entry: './src/index.js',
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
filename: 'bundle.js'
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new HtmlWebPackPlugin({
|
|
template: './src/index.html'
|
|
}),
|
|
new UglifyJsPlugin({
|
|
test: /\.js$/,
|
|
uglifyOptions: {
|
|
mangle: true,
|
|
output: {
|
|
ecma: 5,
|
|
comments: false,
|
|
beautify: false,
|
|
wrap_iife: true
|
|
}
|
|
}
|
|
})
|
|
]
|
|
}; |