This repository has been archived by the owner on Sep 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
webpack.config.js
63 lines (62 loc) · 2.11 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
54
55
56
57
58
59
60
61
62
63
var path = require('path');
module.exports = {
entry: [
"es6-shim",
"reflect-metadata",
"angular2/angular2",
"ionic/ionic",
"web-animations.min",
"moment",
"zone.js",
path.join(__dirname, 'www', 'app', 'app.js')
],
output: {
path: path.join(__dirname, 'www', 'build', 'js'),
filename: 'app.bundle.js',
publicPath: 'build/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: [path.join(__dirname, 'www')],
exclude: /node_modules/
},
{
test: /\.ts$/,
loader: "awesome-typescript-loader",
include: [path.join(__dirname, 'www')],
exclude: /node_modules/
},
{
// Loader to compile all of our SASS down.
// Use the `resolve-url` pipe to convert the relative url paths to something this loader
// can work with, e.g.: url('../my-file.png') => url('/path/to/my-file.png')
// https://github.com/bholloway/resolve-url-loader
test: /\.scss$/,
loaders: ["style", "css", "resolve-url", "sass?sourceMap"]
},
// Any png-image or woff-font below or equal to 100K will be converted to inline base64 instead
{test: /\.(png|woff|ttf)$/, loader: 'url-loader?limit=100000'}
]
},
resolve: {
modulesDirectories: [
"node_modules",
"node_modules/ionic-framework/node_modules", // angular is a dependency of ionic
"node_modules/ionic-framework/dist/js", // for web-animations polyfill
"node_modules/ionic-framework/dist/src/es5/common" // ionic-framework npm package
],
extensions: ["", ".js", ".ts"]
},
// Sass loader configuration to tell webpack where to find the additional SASS files
// it needs for `ionic`, located in the ionic-framework node module folder.
// https://github.com/jtangelder/sass-loader#sass-options
sassLoader: {
includePaths: [
path.resolve(__dirname, "node_modules", 'ionic-framework', 'dist', 'src', 'scss')
]
}
};