-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
45 lines (44 loc) · 1.19 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
var path = require('path');
module.exports = {
context: __dirname + '/app',
entry: [
// The enyo library is built separately and copied (see module.loaders
// below)
'../enyo/build/enyo.css',
'../enyo/build/enyo.js',
// index.html is also copied
'./index.html',
// index.js is our entry point
'./index.ts',
],
output: {
path: __dirname + '/build',
filename: 'app.js',
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
},
module: {
loaders: [
{
test: /\.ts$/,
loader: 'ts-loader'
},
{
test: /\.css$/,
exclude: /enyo\.css$/,
loaders: [
'style-loader',
'css-loader?modules&localIdentName=[path][name]-[local]-[hash:base64:5]',
],
},
{
include: [
path.resolve('./enyo/build'),
path.resolve('./app/index.html'),
],
loader: "file-loader?name=[name].[ext]"
},
]
},
};