| 1 |
var path = require('path'); |
| 2 |
var webpack = require('webpack'); |
| 3 |
var helper=require('path'); |
| 4 |
module.exports = { |
| 5 |
mode: 'development', |
| 6 |
entry: { |
| 7 |
addnewtutorial: './tutorials2/AddNewTutorial.ts', |
| 8 |
datastores:'./formBuilder/dataStores/SmartFormsDataStoreBootstrap.ts', |
| 9 |
conditionalHandlers: './conditional_manager/handlers/HandlerBootstrap.ts', |
| 10 |
conditionalManager: './conditional_manager/ConditionalManagerBootstrap.ts' |
| 11 |
}, |
| 12 |
output: { |
| 13 |
path:path.join(__dirname+'/bundle'), |
| 14 |
filename: '[name]_bundle.js' |
| 15 |
}, |
| 16 |
resolve: { |
| 17 |
modules: [ |
| 18 |
path.resolve('../../node_modules') |
| 19 |
], |
| 20 |
extensions: ['.ts', '.js','.tsx'] |
| 21 |
}, |
| 22 |
devtool: 'source-map', |
| 23 |
module: { |
| 24 |
rules: [ |
| 25 |
{ |
| 26 |
test: /\.js$/, |
| 27 |
use: ["source-map-loader"], |
| 28 |
enforce: "pre" |
| 29 |
}, |
| 30 |
{ |
| 31 |
test: /\.jsx$/, |
| 32 |
use: ["source-map-loader"], |
| 33 |
enforce: "pre" |
| 34 |
}, |
| 35 |
{ |
| 36 |
test: /\.ts$/, |
| 37 |
use: ["ts-loader"], |
| 38 |
exclude:helper.resolve(__dirname,'./typings/jquery.d.ts') |
| 39 |
}, |
| 40 |
{ |
| 41 |
test: /\.tsx$/, |
| 42 |
use: ["ts-loader"] |
| 43 |
} |
| 44 |
] |
| 45 |
}, externals: { |
| 46 |
"jQuery":"jQuery" |
| 47 |
}, |
| 48 |
plugins:[ |
| 49 |
/* |
| 50 |
new webpack.optimize.UglifyJsPlugin({ |
| 51 |
sourceMap: true, |
| 52 |
compress: { |
| 53 |
warnings: false |
| 54 |
} |
| 55 |
})/*, |
| 56 |
new webpack.ProvidePlugin({ |
| 57 |
Promise: 'es6-promise' |
| 58 |
})*/ |
| 59 |
] |
| 60 |
}; |