zulip/tools/webpack.config.js

39 lines
1.1 KiB
JavaScript
Raw Normal View History

var path = require('path');
var assets = require('./webpack.assets.json');
module.exports = {
context: path.resolve(__dirname, "../"),
entry: assets,
module: {
noParse: /(min)\.js/,
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: {
path: path.resolve(__dirname, '../static/webpack-bundles'),
filename: '[name].js',
2015-10-26 17:11:44 +01:00
},
plugins: [],
resolve: {
extensions: [".tsx", ".ts", ".js", ".json"],
},
2015-10-26 17:11:44 +01:00
};