You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/config/webpack.dll.ts

39 lines
923 B

import * as webpack from 'webpack';
import * as path from 'path';
import CleanWebpackPlugin from 'clean-webpack-plugin';
import { outputDir } from './outputPath';
const dllName = "dll";
const vendors = [
"@blueprintjs/core",
"mobx",
"mobx-react",
"react",
"react-color",
"react-dom",
"stats.js",
"xaop",
"react-rnd2",
"dxf-parser",
];
const config: webpack.Configuration = {
mode: "production",
output: {
path: path.resolve(__dirname, outputDir),
filename: "[hash].dll.js",
library: dllName,
},
entry: { "lib": vendors, },
plugins: [
new webpack.DllPlugin({
path: path.resolve(__dirname, `${outputDir}manifest.json`),
name: dllName,
context: __dirname,
}),
new CleanWebpackPlugin([`./dist/*.dll.js`], { root: path.resolve(__dirname, "..") }),
],
};
export default config;