Advertisement
Guest User

Laravel elixir compatible webpack config

a guest
Aug 30th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const WebpackShellPlugin = require('webpack-shell-plugin')
  2. const path = require('path')
  3.  
  4. module.exports = {
  5.     entry: {
  6.         employee: path.resolve(__dirname, 'resources/assets/js/employee.js'),
  7.         company: path.resolve(__dirname, 'resources/assets/js/company.js')
  8.     },
  9.     output: {
  10.         path: path.resolve(__dirname, 'html/js'),
  11.         filename: "[name].js"
  12.     },
  13.     plugins: [
  14.         new WebpackShellPlugin({
  15.             onBuildEnd: ['gulp version']
  16.         })
  17.     ],
  18.     module: {
  19.         loaders: [
  20.             {
  21.                 test: /\.vue$/,
  22.                 exclude: /node_modules/,
  23.                 loader: "vue"
  24.             },
  25.             {
  26.                 test: /\.js$/,
  27.                 exclude: /node_modules/,
  28.                 loader: 'babel',
  29.                 query: {
  30.                     presets: ['es2015']
  31.                 }
  32.             },
  33.             {
  34.                 test: /\.json/,
  35.                 loader: "json"
  36.             }
  37.         ]
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement