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.
59 lines
1.4 KiB
59 lines
1.4 KiB
const nodeExternals = require('webpack-node-externals'); |
|
// const CopyPlugin = require('copy-webpack-plugin'); |
|
const webpack = require('webpack') |
|
const TerserPlugin = require('terser-webpack-plugin'); |
|
// const JavaScriptObfuscator = require('webpack-obfuscator'); |
|
|
|
module.exports = { |
|
entry: './docker/index.js', |
|
module: { |
|
rules: [ |
|
// { |
|
// test: /\.tsx?$/, |
|
// exclude: /node_modules/, |
|
// use: [ |
|
// { |
|
// loader: 'ts-loader', |
|
// options: { |
|
// transpileOnly : false, |
|
// happyPackMode : false, |
|
// configFile:"tsconfig.json" |
|
// } |
|
// } |
|
// ] |
|
// }, |
|
], |
|
}, |
|
resolve: { |
|
extensions: ['.js'], |
|
}, |
|
output: { |
|
path: require('path').resolve("./docker"), |
|
filename: "main.js", |
|
library: 'libs', |
|
libraryTarget: 'umd', |
|
globalObject: "typeof self !== 'undefined' ? self : this" |
|
}, |
|
optimization: { |
|
minimize: true, //Update this to true or false |
|
minimizer: [new TerserPlugin()], |
|
nodeEnv:false |
|
}, |
|
externals: [nodeExternals()], |
|
plugins: [ |
|
new webpack.EnvironmentPlugin([ |
|
'EE' |
|
]), |
|
// new JavaScriptObfuscator({ |
|
// rotateStringArray: true, |
|
// splitStrings: true, |
|
// splitStringsChunkLength: 6 |
|
// }, []), |
|
// new CopyPlugin({ |
|
// patterns: [ |
|
// "src/**/*.ejs" |
|
// ], |
|
// }) |
|
], |
|
target: 'node', |
|
}; |