diff --git a/babel.config.json b/babel.config.json index b163059..11d44d1 100644 --- a/babel.config.json +++ b/babel.config.json @@ -4,7 +4,8 @@ { "targets": { "node": 14 - } + }, + "modules": false } ], ["@babel/preset-typescript" diff --git a/helpers/mu/index.js b/helpers/mu/index.js index 3f84979..eb041b5 100644 --- a/helpers/mu/index.js +++ b/helpers/mu/index.js @@ -1,6 +1,6 @@ -import { app, errorHandler } from './server'; -import sparql from './sparql'; -import { v1 as uuidV1 } from 'uuid'; +import { app, errorHandler } from "./server.js"; +import sparql from "./sparql.js"; +import { v1 as uuidV1 } from "uuid"; // generates a uuid const uuid = uuidV1; @@ -20,7 +20,7 @@ const mu = { sparqlEscapeDateTime: sparql.sparqlEscapeDateTime, sparqlEscapeBool: sparql.sparqlEscapeBool, uuid, - errorHandler + errorHandler, }; const SPARQL = mu.SPARQL, diff --git a/package.json b/package.json index 25fc50b..29931c3 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "mu-javascript-template", "version": "1.5.0-beta.4", "description": "Template for mu services written in JavaScript", + "type": "module", "repository": { "type": "git", "url": "git+https://github.com/mu-semtech/mu-javascript-template.git" diff --git a/tsconfig-base.json b/tsconfig-base.json index deda59a..5b2db41 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -4,7 +4,7 @@ "compilerOptions": { "lib": ["es2020"], - "module": "commonjs", + "module": "es2020", "target": "es2020", "allowJs": true, "noEmit": true,