25 lines
561 B
TypeScript
25 lines
561 B
TypeScript
import * as webpack from 'webpack';
|
|
import * as merge from 'webpack-merge';
|
|
import common from './webpack.common';
|
|
import * as path from 'path';
|
|
|
|
const config: webpack.Configuration = merge(
|
|
common,
|
|
{
|
|
mode: "production",
|
|
entry: "./src/index.ts",
|
|
externals: {
|
|
'three': "THREE"
|
|
},
|
|
//输出设置
|
|
output: {
|
|
filename: "cad.js",
|
|
path: path.resolve(__dirname, './umd'),
|
|
library: "cad",
|
|
libraryTarget: "umd"
|
|
},
|
|
}
|
|
);
|
|
|
|
export default config;
|