Corrected ES6 exports
This commit is contained in:
parent
1c799ba110
commit
7a6d1c4c5a
@ -87,7 +87,7 @@ function log(...args) {
|
||||
|
||||
function enableDebug(active) {
|
||||
DEBUG = !!active;
|
||||
log("PawSQLite-WebSQL-Adapter: debugging " + (
|
||||
log("PawSQLite-Node-Adapter: debugging " + (
|
||||
DEBUG ? "enabled" : "disabled")
|
||||
);
|
||||
}
|
||||
@ -292,7 +292,7 @@ var __webpack_exports__ = {};
|
||||
\******************************/
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ "PawSQLiteNodeAdapter": () => (/* binding */ PawSQLiteNodeAdapter)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _node_adapter_error_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_adapter_error.mjs */ "./src/node_adapter_error.mjs");
|
||||
/* harmony import */ var _database_wrapper_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./database_wrapper.mjs */ "./src/database_wrapper.mjs");
|
||||
@ -305,7 +305,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
const databases = new Map();
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||
const PawSQLiteNodeAdapter = {
|
||||
name: "PawSQLiteNodeAdapter",
|
||||
open: async (dbName) => {
|
||||
if (!databases.has(dbName)) {
|
||||
@ -337,7 +337,7 @@ const databases = new Map();
|
||||
},
|
||||
|
||||
debug: _log_mjs__WEBPACK_IMPORTED_MODULE_3__.enableDebug
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function getDatabase(dbName) {
|
||||
@ -349,7 +349,7 @@ function getDatabase(dbName) {
|
||||
}
|
||||
})();
|
||||
|
||||
module.exports = __webpack_exports__.default;
|
||||
module.exports = __webpack_exports__.PawSQLiteNodeAdapter;
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=pawsqlite-node-adapter.js.map
|
1
cjs/pawsqlite-node-adapter.js.map
Normal file
1
cjs/pawsqlite-node-adapter.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,7 +2,12 @@
|
||||
"name": "pawsqlite-node-adapter",
|
||||
"version": "1.0.0",
|
||||
"description": "A Node.js adapter for PawSQLite",
|
||||
"main": "./lib/pawsqlite-node-adapter.js",
|
||||
"main": "./cjs/pawsqlite-node-adapter.js",
|
||||
"exports": {
|
||||
"import": "./src/node_adapter.mjs",
|
||||
"require": "./cjs/pawsqlite-node-adapter.js"
|
||||
},
|
||||
"module": "./src/node_adapter.mjs",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "webpack"
|
||||
|
@ -5,7 +5,7 @@ import { enableDebug, log } from "./log.mjs";
|
||||
|
||||
const databases = new Map();
|
||||
|
||||
export default {
|
||||
export const PawSQLiteNodeAdapter = {
|
||||
name: "PawSQLiteNodeAdapter",
|
||||
open: async (dbName) => {
|
||||
if (!databases.has(dbName)) {
|
||||
|
@ -10,9 +10,9 @@ var config = {
|
||||
sqlite3: 'sqlite3'
|
||||
},
|
||||
output: {
|
||||
path: __dirname + '/lib',
|
||||
path: __dirname + '/cjs',
|
||||
filename: outputFile,
|
||||
libraryExport: 'default',
|
||||
libraryExport: 'PawSQLiteNodeAdapter',
|
||||
libraryTarget: 'commonjs2',
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user