2017-05-22 22:49:20 +02:00
|
|
|
var path = require('path');
|
2017-05-25 19:37:07 +02:00
|
|
|
var assets = require('./webpack.assets.json');
|
2017-05-22 22:49:20 +02:00
|
|
|
|
2017-05-24 00:03:53 +02:00
|
|
|
module.exports = {
|
|
|
|
context: path.resolve(__dirname, "../"),
|
2017-05-25 19:37:07 +02:00
|
|
|
entry: assets,
|
2017-05-25 04:08:30 +02:00
|
|
|
module: {
|
|
|
|
noParse: /(min)\.js/,
|
2017-05-24 20:31:00 +02:00
|
|
|
rules: [
|
|
|
|
// Run the typescript compilier on .ts files before webpack
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
loader: 'ts-loader',
|
|
|
|
},
|
|
|
|
// This loads and transforms sourcemap files from other compiliers.
|
|
|
|
// The typescript comilier will generate a sourcemap and source-map-loaded will output
|
|
|
|
// the correct sourcemap from that.
|
|
|
|
{
|
|
|
|
enforce: 'pre',
|
|
|
|
test: /\.js$/,
|
|
|
|
loader: "source-map-loader",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
enforce: 'pre',
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: "source-map-loader",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2015-10-26 17:11:44 +01:00
|
|
|
output: {
|
2017-05-24 00:03:53 +02:00
|
|
|
path: path.resolve(__dirname, '../static/webpack-bundles'),
|
|
|
|
filename: '[name].js',
|
2015-10-26 17:11:44 +01:00
|
|
|
},
|
2017-05-24 00:03:53 +02:00
|
|
|
plugins: [],
|
2017-05-24 20:31:00 +02:00
|
|
|
resolve: {
|
|
|
|
extensions: [".tsx", ".ts", ".js", ".json"],
|
|
|
|
},
|
2015-10-26 17:11:44 +01:00
|
|
|
};
|