-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config_old.js
74 lines (71 loc) · 2.12 KB
/
webpack.config_old.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
64
65
66
67
68
69
70
71
72
73
74
//Webpack congiguration
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
// for faster builds use 'eval'
devtool: 'source-map',
debug: true, // remove in production
entry: {
'vendor': './app/vendor.ts',
"app": './app/boot.ts',
"style": './app/styles.ts'
},
output: {
path: path.resolve('./app'),
filename: '[name].js',
sourceMapFilename: '[name].map',
chunkFilename: '[id].chunk.js'
},
resolve: {
/*
* An array of extensions that should be used to resolve modules.
*
* See: http://webpack.github.io/docs/configuration.html#resolve-extensions
*/
//extentions: ['', '.ts', '.js']
},
module: {
preLoaders: [
{
test: /\.component.css$/,
loader: 'raw-loader',
exclude: [path.resolve(__dirname, 'styles.ts')]
}
],
loaders: [
{
test: /\.ts$/,
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: [ /\.(spec|e2e)\.ts$/, /node_modules\/(?!(ng2-.+))/ ]
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('raw-loader'),
exclude: [/\.component\.css$/]
},
{ test: /\.html$/, loader: 'raw-loader' }
]
},
plugins: [
new ExtractTextPlugin("style.css", {
allChunks: true
})
],
devServer: {
port: 3000,
host: 'localhost',
historyApiFallback: true,
contentBase: path.resolve('./app')//,
//publicPath: '/app'
//outputPath:
}
}