tsdk
Version:
Type-safe API development and code share tool for TypeScript projects.
29 lines (27 loc) • 996 B
TypeScript
import webpack from 'webpack';
export declare const tsdkConfigFilePath: string;
/**
* in order to ignore built-in modules like path, fs, etc.
* add `externalsPresets: { node: true },`, default is ignore all built-in modules.
*
* in order to ignore all modules in node_modules folder, default is ignore all node_modules.
* if you dont want ignore modules in node_modules, you can add `externals: []`
*
* @Example:
webpackBuild({
name: 'nestjs-todo',
entry: './dist/modules/nestjs-todo/main.js',
mode: 'production',
devtool: "source-map",
externals: undefined, // build all node_modules into one file
target: 'node',
output: {
path: path.resolve(process.cwd(), 'dist-nestjs-todo'),
filename: 'main.js',
},
})
*/
export declare function webpackBuild({ nodeExternalsParams, ...webpackConfig }: webpack.Configuration & {
/** webpack-node-externals params */
nodeExternalsParams?: any;
}): Promise<unknown>;