FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular2-webpack-starter/webpack.config.js at master · correasebastian/angular2-webpack-starter · GitHub
correasebastian
/
angular2-webpack-starter
Public
forked from
PatrickJS/angular-webpack-starter
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
angular2-webpack-starter
/
webpack.config.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
96 lines (81 loc) · 2.35 KB
Breadcrumbs
angular2-webpack-starter
/
webpack.config.js
Copy path
File metadata and controls
96 lines (81 loc) · 2.35 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//
@AngularClass
/*
* Helper: root(), and rootDir() are defined at the bottom
*/
var
path
=
require
(
'path'
)
;
var
webpack
=
require
(
'webpack'
)
;
// Webpack Plugins
var
CommonsChunkPlugin
=
webpack
.
optimize
.
CommonsChunkPlugin
;
/*
* Config
*/
module
.
exports
=
{
// for faster builds use 'eval'
devtool
:
'source-map'
,
debug
:
true
,
entry
:
{
'vendor'
:
'./src/vendor.ts'
,
'app'
:
'./src/bootstrap.ts'
// our angular app
}
,
// Config for our build files
output
:
{
path
:
root
(
'__build__'
)
,
filename
:
'[name].js'
,
sourceMapFilename
:
'[name].map'
,
chunkFilename
:
'[id].chunk.js'
}
,
resolve
:
{
// ensure loader extensions match
extensions
:
[
''
,
'.ts'
,
'.js'
,
'.json'
,
'.css'
,
'.html'
]
}
,
module
:
{
preLoaders
:
[
{
test
:
/
\.
t
s
$
/
,
loader
:
'tslint-loader'
}
]
,
loaders
:
[
// Support for .ts files.
{
test
:
/
\.
t
s
$
/
,
loader
:
'ts-loader'
,
query
:
{
'ignoreDiagnostics'
:
[
2403
,
// 2403 -> Subsequent variable declarations
2300
,
// 2300 Duplicate identifier
2374
,
// 2374 -> Duplicate number index signature
2375
// 2375 -> Duplicate string index signature
]
}
,
exclude
:
[
/
\.
s
p
e
c
\.
t
s
$
/
,
/
\.
e
2
e
\.
t
s
$
/
,
/
n
o
d
e
_
m
o
d
u
l
e
s
/
]
}
,
// Support for *.json files.
{
test
:
/
\.
j
s
o
n
$
/
,
loader
:
'json-loader'
}
,
// Support for CSS as raw text
{
test
:
/
\.
c
s
s
$
/
,
loader
:
'raw-loader'
}
,
// support for .html as raw text
{
test
:
/
\.
h
t
m
l
$
/
,
loader
:
'raw-loader'
}
,
]
,
noParse
:
[
/
z
o
n
e
\.
j
s
\/
d
i
s
t
\/
.
+
/
,
/
a
n
g
u
l
a
r
2
\/
b
u
n
d
l
e
s
\/
.
+
/
]
}
,
plugins
:
[
new
CommonsChunkPlugin
(
{
name
:
'vendor'
,
filename
:
'vendor.js'
,
minChunks
:
Infinity
}
)
,
new
CommonsChunkPlugin
(
{
name
:
'common'
,
filename
:
'common.js'
,
minChunks
:
2
,
chunks
:
[
'app'
,
'vendor'
]
}
)
]
,
// Other module loader config
tslint
:
{
emitErrors
:
false
,
failOnHint
:
false
}
,
// our Webpack Development Server config
devServer
:
{
historyApiFallback
:
true
,
contentBase
:
'src/public'
,
publicPath
:
'/__build__'
}
}
;
// Helper functions
function
root
(
args
)
{
args
=
Array
.
prototype
.
slice
.
call
(
arguments
,
0
)
;
return
path
.
join
.
apply
(
path
,
[
__dirname
]
.
concat
(
args
)
)
;
}
function
rootNode
(
args
)
{
args
=
Array
.
prototype
.
slice
.
call
(
arguments
,
0
)
;
return
root
.
apply
(
path
,
[
'node_modules'
]
.
concat
(
args
)
)
;
}
Back
|
FazBrowse Home
|
New Git URL