Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- let path = require('path');
- const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
- module.exports = {
- mode: 'development',
- entry: './src/js/script.js',
- output: {
- filename: 'bundle.js',
- path: __dirname + '/dist/js'
- },
- watch: true,
- devtool: "source-map",
- module: {
- rules: [
- {
- test: /\.js$/,
- exclude: /(node_modules|bower_components)/,
- use: {
- loader: 'babel-loader?optional[]=runtime',
- options: {
- presets: [
- ["@babel/env", {
- targets: {
- edge: "17",
- firefox: "60",
- chrome: "67",
- safari: "11.1",
- ie: "11"
- },
- useBuiltIns: "usage"
- }]
- ]
- }
- }
- }
- ]
- },
- plugins: [
- new UglifyJsPlugin()
- ]
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement