1 | 'use strict';
|
2 |
|
3 | var
|
4 | path = require('path'),
|
5 | webpack = require('webpack'),
|
6 | nodeModulesPath = path.join(__dirname, 'node_modules');
|
7 |
|
8 | module.exports = {
|
9 | cache: true,
|
10 | entry: './public/js/app.js',
|
11 | output: {
|
12 | path: path.join(__dirname, 'public/classes'),
|
13 | filename: 'classes.all.js'
|
14 | },
|
15 | module: {
|
16 | noParse: [
|
17 | /brace/,
|
18 | /angular/
|
19 | ],
|
20 | loaders: [{
|
21 | test: /\.css$/,
|
22 | loader: 'style-loader!css-loader',
|
23 | exclude: /node_modules/
|
24 | }, {
|
25 | test: /\.json$/,
|
26 | loader: 'json-loader'
|
27 | }]
|
28 | },
|
29 | resolve: {
|
30 | modulesDirectories: ['node_modules', 'plugins'],
|
31 | extensions: ['', '.webpack.js', '.web.js', '.js'],
|
32 | alias: {
|
33 | 'angular': 'angular/angular',
|
34 | 'md': 'core/markdown-it'
|
35 | }
|
36 | },
|
37 | resolveLoader: {
|
38 | root: nodeModulesPath
|
39 | },
|
40 | plugins: [
|
41 | new webpack.ProvidePlugin({
|
42 | 'angular': 'exports?angular!angular'
|
43 | })
|
44 | ]
|
45 | }; |
\ | No newline at end of file |