-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
52 lines (49 loc) · 1.48 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
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&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/node_modules", // angular is a dependency of ionic
"node_modules/ionic-framework/dist/src/es5/common", // ionic-framework npm package (stable)
"node_modules/ionic-framework/dist/js", // for web-animations polyfill
// See README for steps on developing against ionic-framework locally
// "dist/src/es5/common" // when developing against locally linked ionic-framework (master)
],
extensions: ["", ".js", ".ts"]
}
};