var webpack = require("webpack"); var path = require("path"); var BUILD_DIR = path.resolve(__dirname, 'build/public/'); var SRC_DIR = path.resolve(__dirname, 'src/public/js'); module.exports = { entry: path.join(SRC_DIR, 'app.js'), output: { path: BUILD_DIR, filename: 'js/app.js', }, devtool: 'source-map', module: { loaders: [ { test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/, query: { compact: false, presets: ["es2015", "react" ] } }, { test: /\.less$/, loader: 'style-loader!css-loader!less-loader', }, { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" }, { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" } ] }, plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('development') }) ], resolve: { extensions: ['', '.js', '.jsx'] }, };