forked from codechavez/angular-inline-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
31 lines (30 loc) · 1.12 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
var webpack = require('webpack');
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry:path.resolve(__dirname,'demo/main.ts'),
output:{
path: path.resolve(__dirname,'dist'),
filename:'app.[hash].bundle.js'
},
module:{
rules:[
{ test: /\.component.ts$/, loaders: 'angular2-template-loader'},
{ test: /\.ts$/,loaders:'awesome-typescript-loader'},
{ test: /\.html$/, loaders:'html-loader'},
{ test: /\.css$/, use: ExtractTextPlugin.extract({fallback:"style-loader",use: "css-loader"}) },
{ test: /\.(jpg|png|gif|svg)$/, loader: 'file-loader' }
]
},
resolve:{
extensions: ['*', '.js', '.ts', '.html', '.css', '.less','.scss','.ttf','.eot','.svg','.woff','.woff2', '.jpg', '.png', '.gif']
},
plugins:[
new HtmlWebpackPlugin({
template:'./demo/index.html'
}),
new ExtractTextPlugin("app.[hash].css"),
]
};