superset/panoramix/assets/webpack.config.js

39 lines
1.0 KiB
JavaScript
Raw Normal View History

var webpack = require('webpack');
var path = require('path');
var APP_DIR = path.resolve(__dirname, './'); // input
var BUILD_DIR = path.resolve(__dirname, './javascripts/dist'); // output
var config = {
// for now generate one compiled js file per entry point / html page
entry: {
2016-02-25 21:14:13 -05:00
dashboard: APP_DIR + '/javascripts/dashboard.js',
explore: APP_DIR + '/javascripts/explore.js',
2016-02-24 19:48:15 -05:00
featured: APP_DIR + '/javascripts/featured.js',
2016-02-25 21:14:13 -05:00
sql: APP_DIR + '/javascripts/sql.js',
2016-03-01 21:22:41 -05:00
standalone: APP_DIR + '/javascripts/standalone.js',
},
output: {
path: BUILD_DIR,
filename: '[name].entry.js'
},
module : {
loaders : [
{
test: /\.jsx?/,
include: APP_DIR,
exclude: APP_DIR + '/node_modules',
loader: 'babel' // transpile jsx + ES2015/6 -> ES5
},
{
test: /\.css$/,
2016-02-26 21:35:59 -05:00
//exclude: APP_DIR + '/node_modules',
loader: "style-loader!css-loader" // load css via require('../*.css')
2016-02-26 01:38:48 -05:00
},
]
},
plugins: []
};
module.exports = config;