nmdc-webfrontend/webpack.config.js

46 lines
892 B
JavaScript
Raw Normal View History

/*! webpack.config.js */
const webpack = require("webpack");
const CleanCSSPlugin = require("less-plugin-clean-css");
module.exports = {
entry: "./client/dcwebui.js",
output: {
path: __dirname,
filename: "clientpack/bundle.min.js"
},
module: {
loaders: [
// Plain CSS files (no longer present)
{ test: /\.css$/, loader: "style-loader!css-loader" },
// LESS CSS files
{
test: /\.less$/,
use: [
{ loader: "style-loader" },
{ loader: "css-loader" },
{
loader: "less-loader",
options: {
noIeCompat: false,
plugins: [
new CleanCSSPlugin({ advanced: true })
]
}
}
]
}
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
};