54 lines
1.2 KiB
JavaScript
54 lines
1.2 KiB
JavaScript
/*! webpack.config.js */
|
|
|
|
const webpack = require("webpack");
|
|
const path = require('path');
|
|
const CleanCSSPlugin = require("less-plugin-clean-css");
|
|
|
|
module.exports = {
|
|
entry: "./client/dcwebui.ts",
|
|
output: {
|
|
path: path.resolve(__dirname, 'clientpack'),
|
|
filename: "bundle.min.js"
|
|
},
|
|
resolve: {
|
|
// Add '.ts' and '.tsx' as a resolvable extension.
|
|
extensions: [ '.tsx', '.ts', '.js' ]
|
|
},
|
|
module: {
|
|
loaders: [
|
|
|
|
// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'
|
|
{ test: /\.tsx?$/, loader: "ts-loader" },
|
|
|
|
// 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
|
|
}
|
|
})
|
|
]
|
|
};
|