forked from steemit-intl/steemit.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.config.js
61 lines (56 loc) · 1.8 KB
/
base.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
57
58
59
60
61
import path from 'path';
import webpack from 'webpack';
import writeStats from './utils/write-stats';
const scssLoaders = 'style!css!autoprefixer!sass?outputStyle=expanded';
const cssLoaders = 'style!css!autoprefixer';
const Webpack_isomorphic_tools_plugin = require('webpack-isomorphic-tools/plugin');
const webpack_isomorphic_tools_plugin =
new Webpack_isomorphic_tools_plugin(require('./webpack-isotools-config'))
.development();
export default {
entry: {
app: ['babel-polyfill', './app/Main.js'],
vendor: ['react', 'react-dom', 'react-router']
},
output: {
path: path.resolve(__dirname, '../dist'),
filename: '[name].[hash].js',
chunkFilename: '[id].[hash].js',
publicPath: '/assets/'
},
module: {
loaders: [
{test: /\.(jpe?g|png)/, loader: 'url-loader?limit=4096'},
{test: /\.json$/, loader: 'json'},
{test: /\.js$|\.jsx$/, exclude: /node_modules/, loader: 'babel'},
{test: /\.svg$/, loader: 'svg-inline-loader'},
{
test: require.resolve("blueimp-file-upload"),
loader: "imports?define=>false"
},
{
test: require.resolve("medium-editor-insert-plugin"),
loader: "imports?define=>false"
}
]
},
plugins: [
// write webpack stats
function () { this.plugin('done', writeStats); },
webpack_isomorphic_tools_plugin
],
resolve: {
root: [
path.resolve(__dirname, '..')
],
extensions: ['', '.js', '.json', '.jsx'],
modulesDirectories: ['node_modules']
},
scssLoaders,
cssLoaders
};
/* medium-editor, add to plugins[]
new webpack.ProvidePlugin({
$: 'jquery'
})
*/