mirror of https://github.com/nocodb/nocodb
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.
47 lines
1006 B
47 lines
1006 B
2 months ago
|
const nodeExternals = require('webpack-node-externals');
|
||
|
const TerserPlugin = require('terser-webpack-plugin');
|
||
|
const webpack = require('webpack');
|
||
|
const path = require('path');
|
||
|
module.exports = {
|
||
|
entry: './src/index.ts',
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.tsx?$/,
|
||
|
exclude: /node_modules/,
|
||
|
use: {
|
||
|
loader: 'ts-loader',
|
||
|
options: {
|
||
|
transpileOnly: true
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
|
||
|
optimization: {
|
||
2 months ago
|
minimize: true,
|
||
2 months ago
|
minimizer: [new TerserPlugin()],
|
||
|
nodeEnv: false
|
||
|
},
|
||
|
externals: [nodeExternals()],
|
||
|
resolve: {
|
||
|
extensions: ['.tsx', '.ts', '.js', '.json'],
|
||
|
},
|
||
|
output: {
|
||
|
filename: 'cli.js',
|
||
|
path: path.resolve(__dirname, 'dist'),
|
||
|
library: 'libs',
|
||
|
libraryTarget: 'umd',
|
||
|
globalObject: "typeof self !== 'undefined' ? self : this",
|
||
|
},
|
||
|
// node: {
|
||
|
// fs: 'empty'
|
||
|
// },
|
||
|
plugins: [
|
||
|
new webpack.BannerPlugin({banner: "#! /usr/bin/env node", raw: true}),
|
||
|
],
|
||
|
|
||
|
target: 'node',
|
||
|
};
|