Using ES Modules

This commit is contained in:
Daniel Hutzel
2024-07-16 15:29:45 +02:00
parent 7a2e345cd5
commit cba8e0cc5c
12 changed files with 25 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
const cds = require('@sap/cds')
import cds from '@sap/cds'
/**
* In order to keep basic bookshop sample as simple as possible, we don't add
@@ -8,7 +8,7 @@ const cds = require('@sap/cds')
// NOTE: We use cds.on('served') to delay the UPSERTs after the db init
// to run after all INSERTs from .csv files happened.
module.exports = cds.on('served', ()=>
export default cds.on('served', ()=>
UPSERT.into ('sap.common.Currencies') .columns (
[ 'code', 'symbol', 'name' ]
) .rows (