forked from casesandberg/react-color
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
51 lines (50 loc) · 1.38 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
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: ['./docs/index.js'],
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
publicPath: 'build/',
},
module: {
loaders: [
{
test: /\.js$/,
include: /react-context/,
loaders: ['babel-loader'],
},
{
test: /\.js$/,
exclude: [/node_modules/, /modules/],
loaders: ['babel-loader', 'react-map-styles'],
}, {
test: /\.jsx$/,
exclude: [/node_modules/, /modules/],
loaders: ['jsx-loader', 'babel-loader', 'react-map-styles'],
}, {
test: /\.css$/,
loaders: ['style-loader', 'css-loader'],
}, {
test: /\.md$/,
loaders: ['html-loader'],
},
],
},
resolve: {
alias: {
'react-color': path.resolve(__dirname, './src/index.js'),
'react': path.resolve(__dirname, './node_modules/react'),
'remarkable': path.resolve(__dirname, './modules/remarkable'),
'highlight.js': path.resolve(__dirname, './modules/highlight.js'),
'tinycolor2': path.resolve(__dirname, './modules/tinycolor2'),
},
extensions: ['', '.js', '.jsx'],
fallback: [path.resolve(__dirname, './modules')],
},
plugins: [
new webpack.HotModuleReplacementPlugin({ quiet: true }),
new webpack.NoErrorsPlugin(),
],
quiet: true,
}