-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.test.config.js
40 lines (39 loc) · 966 Bytes
/
webpack.test.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
'use strict';
var path = require('path');
var webpack = require('webpack');
var fs = require('fs');
module.exports = {
devtool: 'sourcemap',
entry: function(){
var files = fs.readdirSync('./app/typescripts/tests');
var obj = {}
files.forEach(function(file){
let value = './app/typescripts/tests/'+file;
let key = path.basename(file,'.ts');
obj[key] = value;
});
return obj;
}(),
output: {
path: __dirname,
filename: "[name].bundle.js",
},
resolve: {
extensions: ['', '.js', '.ts'],
root: [path.join(__dirname, "app/libraries")],
},
module: {
loaders: [
{ test: /\.ejs/, loader: 'underscore-template-loader' },
{ test: /\.ts$/, loader: 'webpack-espower!ts?sourceMap&target=ES5&noImplicitAny' },
]
},
externals: {
'jquery': '$',
'backbone': 'Backbone',
'marionette': 'Marionette',
'power-assert': 'assert',
},
plugins: [
]
};