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.
53 lines
1.1 KiB
53 lines
1.1 KiB
2 years ago
|
const path = require('path');
|
||
2 years ago
|
const nodeExternals = require('webpack-node-externals');
|
||
|
const webpack = require('webpack');
|
||
2 years ago
|
const CopyPlugin = require('copy-webpack-plugin');
|
||
|
//
|
||
2 years ago
|
const TerserPlugin = require('terser-webpack-plugin');
|
||
|
|
||
|
module.exports = {
|
||
2 years ago
|
entry: './src/index.ts',
|
||
2 years ago
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.tsx?$/,
|
||
|
exclude: /node_modules/,
|
||
|
use: {
|
||
|
loader: 'ts-loader',
|
||
|
options: {
|
||
2 years ago
|
transpileOnly: true,
|
||
|
},
|
||
2 years ago
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
|
||
|
optimization: {
|
||
|
minimize: true, //Update this to true or false
|
||
|
minimizer: [new TerserPlugin()],
|
||
2 years ago
|
nodeEnv: false,
|
||
2 years ago
|
},
|
||
2 years ago
|
externals: [nodeExternals()],
|
||
2 years ago
|
resolve: {
|
||
|
extensions: ['.tsx', '.ts', '.js', '.json'],
|
||
|
},
|
||
|
output: {
|
||
2 years ago
|
filename: 'bundle.js',
|
||
|
path: path.resolve(__dirname, 'dist'),
|
||
2 years ago
|
library: 'libs',
|
||
|
libraryTarget: 'umd',
|
||
2 years ago
|
globalObject: "typeof self !== 'undefined' ? self : this",
|
||
2 years ago
|
},
|
||
|
node: {
|
||
|
__dirname: false,
|
||
|
},
|
||
|
plugins: [
|
||
2 years ago
|
new webpack.EnvironmentPlugin(['EE']),
|
||
|
new CopyPlugin({
|
||
|
patterns: [{ from: 'public', to: 'public' }],
|
||
|
}),
|
||
2 years ago
|
],
|
||
|
|
||
|
target: 'node',
|
||
|
};
|