1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/packages/unleash-frontend/webpack.config.js

42 lines
824 B
JavaScript
Raw Normal View History

// docs: http://webpack.github.io/docs/configuration.html
2016-06-18 21:53:18 +02:00
'use strict';
const path = require('path');
const publicRoot = path.join(__dirname, 'public');
const jsroot = path.join(publicRoot, 'js');
module.exports = {
context: jsroot,
entry: './app.jsx',
output: {
path: publicRoot,
filename: 'bundle.js',
2016-06-18 21:55:46 +02:00
publicPath: '/js/',
},
resolve: {
root: [jsroot],
extensions: ['', '.js', '.jsx'],
2016-06-18 21:55:46 +02:00
modulesDirectories: ['web_modules', 'node_modules'],
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
},
2016-06-18 21:55:46 +02:00
],
},
2016-06-18 21:55:46 +02:00
devtool: 'source-map',
externals: {
// stuff not in node_modules can be resolved here.
2016-06-18 21:55:46 +02:00
},
};