-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
54 lines (51 loc) · 1.52 KB
/
webpack.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
41
42
43
44
45
46
47
48
49
50
51
52
53
var path = require('path');
var wwwPath = path.resolve(__dirname, 'www');
var outputPath = path.join(wwwPath, 'build', 'js');
var appPath = path.join(wwwPath, 'app');
var appJsPath = path.join(appPath, 'app.js');
module.exports = {
entry: [
"es6-shim",
"zone.js",
"reflect-metadata",
"web-animations.min",
// "./www/app/app.js"
appJsPath
],
output: {
path: outputPath,
filename: 'app.bundle.js'
//pathinfo: true // show module paths in the bundle, handy for debugging
},
module: {
loaders: [
{
test: /\.js$/,
loader: "awesome-typescript-loader?doTypeCheck=false&useBabel=true&useWebpackText=true",
include: [wwwPath],
// include: /www(\/|\\)app(\/|\\)/,
exclude: /node_modules/
},
{
test: /\.ts$/,
loader: "awesome-typescript-loader",
// include: /www(\/|\\)app(\/|\\)/,
include: [wwwPath],
exclude: /node_modules/
}
]
},
resolve: {
modulesDirectories: [
"node_modules",
"node_modules/ionic-framework/dist/src/es5/common", // ionic-framework npm package (stable)
"node_modules/ionic-framework/node_modules", // angular is a dependency of ionic
"node_modules/ionic-framework/dist/js", // for web-animations polyfill
// "node_modules/ionic2/dist/src/es5/common", // driftyco/ionic2 repo (master)
// "dist/src/es5/common",
// "node_modules/ionic2/node_modules",
// "node_modules/ionic2/dist/js"
],
extensions: ["", ".js", ".ts"]
}
};