Convert backend code to ES modules
Bundling code now with Rollup for its flat bundling and tree shaking support. Front end code still goes through Webpack for browser support.
This commit is contained in:
1 parent
824639976f
commit
1e41c72d60
62 files changed
+718
-898
No files matched your search
+12
-12
@@ -1,20 +1,20 @@
|
||||
#!/usr/bin/env node
|
||||
#!/usr/bin/env -S node -r esm
|
||||
"use strict";
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
|
||||
process.chdir(path.resolve(path.dirname(fs.realpathSync(__filename)), ".."));
|
||||
|
||||
const config = require("../lib/config");
|
||||
const logger = require("../lib/logger");
|
||||
const cluster = require("../lib/cluster");
|
||||
const server = require("../lib/server");
|
||||
const cwmp = require("../lib/cwmp");
|
||||
const db = require("../lib/db");
|
||||
const extensions = require("../lib/extensions");
|
||||
const cache = require("../lib/cache");
|
||||
import * as config from "../lib/config";
|
||||
import * as logger from "../lib/logger";
|
||||
import * as cluster from "../lib/cluster";
|
||||
import * as server from "../lib/server";
|
||||
import * as cwmp from "../lib/cwmp";
|
||||
import * as db from "../lib/db";
|
||||
import * as extensions from "../lib/extensions";
|
||||
import * as cache from "../lib/cache";
|
||||
|
||||
const VERSION = require("../package.json").version;
|
||||
import { version as VERSION } from "../package.json";
|
||||
|
||||
logger.init("cwmp", VERSION);
|
||||
|
||||
|
||||
Reference in new issue
Block a user