"use strict";

var path    = require("path")
var webpack = require("webpack")

// Helpers for geting path names
function join(destination) {
  return path.resolve(__dirname, destination);
}

function web(destination) {
  return join("web/static/" + destination)
}

var config = module.exports = {

  entry: web("js/app.js"),

  output: {
    path: join("priv/static/js"),
    filename: "app.js"
  },

   module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: "babel-loader",
        options: {
          presets: ["react", "es2015"],
        },
      }
    ],
  },
};

@@ -1,9 +1,9 @@
-%22
+'
 use stri
@@ -4,17 +4,17 @@
 e strict
-%22
+'
 ;%0A%0Avar p
@@ -17,19 +17,16 @@
 ar path 
-   
 = requir
@@ -31,15 +31,16 @@
 ire(
-%22
+'
 path
-%22)
+');
 %0Avar
@@ -62,18 +62,19 @@
 ire(
-%22
+'
 webpack
-%22)
+');
 %0A%0A//
@@ -225,17 +225,17 @@
 rn join(
-%22
+'
 web/stat
@@ -237,17 +237,17 @@
 /static/
-%22
+'
  + desti
@@ -303,17 +303,17 @@
 ry: web(
-%22
+'
 js/app.j
@@ -313,17 +313,17 @@
 s/app.js
-%22
+'
 ),%0A%0A  ou
@@ -345,17 +345,17 @@
 h: join(
-%22
+'
 priv/sta
@@ -360,17 +360,17 @@
 tatic/js
-%22
+'
 ),%0A    f
@@ -382,24 +382,24 @@
 me: 
-%22
+'
 app.js
-%22
+'
 %0A  %7D,%0A%0A 
   mo
@@ -394,16 +394,71 @@
 %0A  %7D,%0A%0A 
+ resolve: %7B%0A    extensions: %5B'*', '.js', '.jsx'%5D%0A  %7D,%0A%0A
   module
@@ -501,16 +501,18 @@
 t: /%5C.js
+x?
 $/,%0A    
@@ -556,17 +556,17 @@
 loader: 
-%22
+'
 babel-lo
@@ -569,17 +569,17 @@
 l-loader
-%22
+'
 ,%0A      
@@ -615,25 +615,25 @@
 s: %5B
-%22
+'
 react
-%22, %22
+', '
 es2015
-%22
+'
 %5D,%0A 

Resolve *.jsx files