forked from buildog/BarterDEX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.base.js
43 lines (40 loc) · 1.26 KB
/
webpack.config.base.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
import path from 'path'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
const CopyWebpackPlugin = require('copy-webpack-plugin');
export default {
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['babel-loader'],
exclude: /node_modules/
}, {
test: /\.json$/,
loader: 'json-loader'
}, { test: /\.svg$/, loader: 'svg-inline-loader' },
{
test: /^((?!\.global).)*\.css$/,
loader: ExtractTextPlugin.extract(
'style-loader',
'postcss-loader'
)
}, { test: /\.(woff|woff2|eot|ttf)$/, loader: 'url-loader?limit=100000' }
]
},
output: {
path: path.join(__dirname, './dist'),
filename: 'bundle.js',
libraryTarget: 'commonjs2'
},
resolve: {
// root:[],
extensions: ['', '.js', '.jsx', '.json'],
packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main']
},
plugins: [
new CopyWebpackPlugin([
{ from: './app/static', to: path.join(__dirname, './dist/static') },
{ from: './config/coins.json', to: path.join(__dirname, './') }
]),
new ExtractTextPlugin('style.css', { allChunks: true })
]
}