๐Ÿ“ฆ chaokunyang / amanda

๐Ÿ“„ webpack.config.js ยท 26 lines
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
26var path = require('path');

module.exports = {
    entry: './src/main/js/admin/Index.js',
    devtool: 'sourcemaps',
    cache: true,
    debug: true,
    output: {
        path: __dirname,
        filename: './src/main/resources/static/built/bundle.js'
    },
    module: {
        loaders: [
            {
                test: /\.js[x]?$/,
                exclude: /node_modules/,
                loader: 'babel-loader?presets[]=es2015&presets[]=react'
            },
            { test: /\.css$/, loader: 'style-loader!css-loader' },
            {
                test: /\.(svg|png|jpg|jpeg|gif)$/i,
                loaders: ['file', 'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false']
            }
        ]
    }
};