forked from BD2KGenomics/brca-website-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
56 lines (55 loc) · 1.42 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
/*global require: false, module: false, __dirname: false */
'use strict';
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
var path = require('path');
var mdih = require('./loaders/markdown-id-headers');
module.exports = {
historyApiFallback: true,
entry: "./js/index",
output: {
path: "build",
publicPath: "/",
filename: "[name].js"
},
module: {
loaders: [
{ test: /rx-dom/, loader: "imports?define=>false" },
{ test: /\.css$/, loader: "style!css" },
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?optional=es7.objectRestSpread,optional=runtime,cacheDirectory=true'},
{
test: /\.(jpe?g|png|gif|svg|eot|woff2?|ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/i,
loaders: ['url?limit=10000'],
exclude: [path.resolve(__dirname, "js/img/favicon")]
},
{ test: /\.md/, loader: 'html!markdown-it' }
]
},
plugins: [
new HtmlWebpackPlugin({
title: "Template Project",
filename: "index.html",
template: "page.template"
}),
new webpack.OldWatchingPlugin()
],
resolve: {
alias: {
rx$: 'rx/dist/rx',
'rx.binding$': 'rx/dist/rx.binding',
'rx.async$': 'rx/dist/rx.async',
'rx.coincidence$': 'rx/dist/rx.coincidence'
},
extensions: ['', '.js', '.json', '.coffee'],
root: __dirname + "/js"
},
resolveLoader: {
alias: {
'copy': 'file-loader?name=[path][name].[ext]&context=./js'
}
},
'markdown-it': {
html: true,
use: [mdih]
}
};