mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 03:16:01 +00:00
one more optimalization of plugin size & load time
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const SqlDumper = require('dbgate-tools/lib/SqlDumper');
|
||||
const { SqlDumper } = global.DBGATE_TOOLS;
|
||||
|
||||
class Dumper extends SqlDumper {
|
||||
/** @param type {import('dbgate-types').TransformType} */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const driverBase = require('dbgate-tools/lib/driverBase');
|
||||
const { driverBase } = global.DBGATE_TOOLS;
|
||||
const Dumper = require('./Dumper');
|
||||
|
||||
/** @type {import('dbgate-types').SqlDialect} */
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
var webpack = require("webpack");
|
||||
var path = require("path");
|
||||
var webpack = require('webpack');
|
||||
var path = require('path');
|
||||
|
||||
var config = {
|
||||
context: __dirname + "/src/frontend",
|
||||
context: __dirname + '/src/frontend',
|
||||
|
||||
entry: {
|
||||
app: "./index.js",
|
||||
app: './index.js',
|
||||
},
|
||||
target: "web",
|
||||
target: 'web',
|
||||
output: {
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
filename: "frontend.js",
|
||||
libraryTarget: "var",
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'frontend.js',
|
||||
libraryTarget: 'var',
|
||||
library: 'plugin',
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
|
||||
}),
|
||||
],
|
||||
|
||||
// uncomment for disable minimalization
|
||||
// optimization: {
|
||||
// minimize: false,
|
||||
|
||||
Reference in New Issue
Block a user