import path from 'path'; import * as webpack from 'webpack'; import merge from 'webpack-merge'; import common from './webpack.common'; 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;