@@ -4,50 +4,32 @@ var webpack = require('webpack');
44var AureliaWebpackPlugin = require ( 'aurelia-webpack-plugin' ) ;
55
66module . exports = {
7- resolve : { extensions : [ '.js' , '.ts' ] } ,
8- devtool : isDevBuild ? 'inline-source-map' : null ,
9- entry : {
10- 'app' : [ ] , // <-- this array will be filled by the aurelia-webpack-plugin
11- 'aurelia-modules' : [
12- 'aurelia-bootstrapper-webpack' ,
13- 'aurelia-event-aggregator' ,
14- 'aurelia-fetch-client' ,
15- 'aurelia-framework' ,
16- 'aurelia-history-browser' ,
17- 'aurelia-loader-webpack' ,
18- 'aurelia-logging-console' ,
19- 'aurelia-pal-browser' ,
20- 'aurelia-polyfills' ,
21- 'aurelia-route-recognizer' ,
22- 'aurelia-router' ,
23- 'aurelia-templating-binding' ,
24- 'aurelia-templating-resources' ,
25- 'aurelia-templating-router'
26- ]
27- } ,
7+ resolve : { extensions : [ '.js' , '.ts' ] } ,
8+ devtool : isDevBuild ? 'inline-source-map' : null ,
9+ entry : { 'app' : 'aurelia-bootstrapper-webpack' } , // Note: The aurelia-webpack-plugin will add your app's modules to this bundle automatically
2810 output : {
2911 path : path . resolve ( './wwwroot/dist' ) ,
3012 publicPath : '/dist' ,
31- filename : '[name]-bundle .js'
13+ filename : '[name].js'
3214 } ,
3315 module : {
3416 loaders : [
35- { test : / \. t s $ / , include : / C l i e n t A p p / , loader : 'ts' , query : { silent : true } } ,
36- { test : / \. h t m l $ / , loader : 'html-loader ' } ,
37- { test : / \. c s s $ / , loaders : [ 'style-loader ' , 'css-loader' ] } ,
17+ { test : / \. t s $ / , include : / C l i e n t A p p / , loader : 'ts' , query : { silent : true } } ,
18+ { test : / \. h t m l $ / , loader : 'html' } ,
19+ { test : / \. c s s $ / , loaders : [ 'style' , 'css' ] } ,
3820 { test : / \. ( p n g | w o f f | w o f f 2 | e o t | t t f | s v g ) $ / , loader : 'url-loader?limit=100000' }
3921 ]
4022 } ,
4123 plugins : [
42- new webpack . ProvidePlugin ( { $ : 'jquery' , jQuery : 'jquery' } ) , // because Bootstrap expects $ and jQuery to be globals
24+ new webpack . DllReferencePlugin ( {
25+ context : __dirname ,
26+ manifest : require ( './wwwroot/dist/vendor-manifest.json' )
27+ } ) ,
4328 new AureliaWebpackPlugin ( {
4429 root : path . resolve ( './' ) ,
4530 src : path . resolve ( './ClientApp' ) ,
4631 baseUrl : '/'
47- } ) ,
48- new webpack . optimize . CommonsChunkPlugin ( {
49- name : [ 'aurelia-modules' ]
50- } ) ,
32+ } )
5133 ] . concat ( isDevBuild ? [ ] : [
5234 // Plugins that apply in production builds only
5335 new webpack . optimize . UglifyJsPlugin ( )
0 commit comments