SHARE
TWEET

Untitled

a guest Jun 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2.  
  3. let path = require('path');
  4. const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  5.  
  6.  
  7. module.exports = {
  8.   mode: 'development',
  9.   entry: './src/js/script.js',
  10.   output: {
  11.     filename: 'bundle.js',
  12.     path: __dirname + '/dist/js'
  13.   },
  14.   watch: true,
  15.  
  16.   devtool: "source-map",
  17.  
  18.   module: {
  19.     rules: [
  20.       {
  21.         test: /\.js$/,
  22.         exclude: /(node_modules|bower_components)/,
  23.         use: {
  24.           loader: 'babel-loader?optional[]=runtime',
  25.           options: {
  26.             presets: [
  27.               ["@babel/env", {
  28.                 targets: {
  29.                   edge: "17",
  30.                   firefox: "60",
  31.                   chrome: "67",
  32.                   safari: "11.1",
  33.                   ie: "11"
  34.                 },
  35.                 useBuiltIns: "usage"
  36.               }]
  37.             ]
  38.           }
  39.         }
  40.       }
  41.     ]
  42.   },
  43.   plugins: [
  44.     new UglifyJsPlugin()
  45.   ]
  46. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top