CADViewComponent/config/webpack.umd.ts

25 lines
551 B
TypeScript
Raw Normal View History

2022-02-16 13:48:57 +08:00
import path from 'path';
2018-08-17 17:39:11 +08:00
import * as webpack from 'webpack';
2022-02-16 13:48:57 +08:00
import merge from 'webpack-merge';
2018-08-17 21:26:32 +08:00
import common from './webpack.common';
2018-08-17 17:39:11 +08:00
2018-08-17 21:26:32 +08:00
const config: webpack.Configuration = merge(
common,
{
mode: "production",
2018-10-12 17:02:10 +08:00
entry: "./src/index.ts",
2020-05-07 10:51:27 +08:00
externals: {
'three': "THREE"
},
2018-08-17 21:26:32 +08:00
//输出设置
output: {
filename: "cad.js",
2018-10-12 17:02:10 +08:00
path: path.resolve(__dirname, './umd'),
2018-08-17 21:26:32 +08:00
library: "cad",
libraryTarget: "umd"
},
}
);
2018-08-17 17:39:11 +08:00
export default config;