Closed appy-one closed 1 year ago
@Azarattum have you tested your Vite build with this ESM import?
@appy-one, I can confirm that vite
now uses the ESM build. swagger
is still imported unless replace({"process.env.NODE_ENV": "false"})
. However now the swagger build is actually functional. Vite produces multiple files, but it works:
Also, when running build:esm
on the acebase-server
I get the following error:
src/logger.ts:43:5 - error TS2742: The inferred type of 'query' cannot be named without a reference to 'acebase-server/node_modules/acebase-core'. This is likely not portable. A type annotation is necessary.
43 query() {
~~~~~
@Azarattum can you check if process.env.NODE_ENV?.trim()
will work again then? Replacing some && some.thing
with some?.thing
is a thing I do very regularly and it might happen in the future to that line..
I'll look into the build error now.
@Azarattum I think you got the build error because I was using an updated acebase-core version locally. I've published all new packages so if you pull the server code from github now all should build fine
@Azarattum this might be the reason Vite was using the CommonJS build,
import
ing of ESM build was temporarily disabled