aboutsummaryrefslogtreecommitdiff
path: root/juick-ws/webpack.config.js
blob: e6d33a0652d38a6e17322646a7b886da7ac02611 (plain) (blame)
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
var webpack = require("webpack");
var globby = require("globby");
var precss       = require('precss');
var autoprefixer = require('autoprefixer');
var ExtractTextPlugin = require("extract-text-webpack-plugin")
module.exports = {
    entry: {
        "scripts" : globby.sync([
            __dirname + "/src/main/static/*.*"
        ])
    },
    output: {
        path: __dirname + "/src/main/webapp",
        filename: "[name].js"
    },
    module: {
        loaders: [
            { test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!postcss-loader") }
	]
    },
    plugins: [
        new ExtractTextPlugin("style.css", {
            allChunks: true
        })
    ],
    postcss: function() {
        return [require("postcss-import")({ addDependencyTo: webpack, path: ['node_modules'] }), precss({'import': {disable: true}}), autoprefixer];
    }
}