Feat: Vite + React (#991)
* remove test_web * integrate reactjs-vite * update lint-staged * simple cors proxy server which handles cookies and redirections * overrider global fetch with proxy call * simple examples for set cookies and fetch request * app bar * add redux * loadPlugins. error: cant load urlencode module * add ts-node for transforming * plugin search & select * plugin slice * accordion components * path item & popular novel * optional for filters * search novel * parse novel * parseChapter * update cookies * default filters * fix: import path * bundler module resolution * new json_plugins * fix: generate multisrc (missing filters) * fix: host scripts * fix: plugin code path * remove typechecking action
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { minify_sync } from 'terser';
|
||||
import fs from 'fs';
|
||||
|
||||
const config = {
|
||||
compress: {
|
||||
arrows: false,
|
||||
},
|
||||
mangle: {},
|
||||
ecma: 5, // specify one of: 5, 2015, 2016, etc.
|
||||
enclose: false, // or specify true, or "args:values"
|
||||
module: true,
|
||||
toplevel: true,
|
||||
};
|
||||
|
||||
const minify = function (path) {
|
||||
const code = fs.readFileSync(path).toString();
|
||||
const result = minify_sync(code, config);
|
||||
fs.writeFileSync(path, result.code);
|
||||
};
|
||||
|
||||
export { minify };
|
||||
Reference in New Issue
Block a user