-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usage: how to run farrow with esno
?
#127
Comments
esno
?esno
?
You mean the node.js api of It can be used like below. import { build } from 'farrow/dist/build'
import { start } from 'farrow/dist/start'
import { dev } from 'farrow/dist/dev'
await build({...config})
This feature can be turned off. // farrow.config.js
module.exports = {
// for connecting farrow-api-server and codegen farrow-api-client
api: [
{
src: 'http://localhost:3002/api/todo',
dist: `${__dirname}/src/api/todo.ts`,
codegen: {
/**
* emit createApiClient or not
* if set to false, only types will be codegened
*/
emitApiClient: false
}
},
],
} But why do you want to turn off it? It's very useful for communicating with the server automatically.
There is no explicit plan for ESM support. We used to emit ESM version but encounter some wired bug in node.js/webpack/esbuild toolings and can figure out what's happening, so we turn off it. When the js/ts community is ready enough for ESM modules, we will enable the feature. |
got it , thx master,
|
@yolio2003 Try it out~ |
got it thx! i think you can do this in 10 seconds by default, if you want to show the feature. |
hey boss, i have successly run with
so the idea is can we just complied from the sorry for nagging again. |
Does here need two build outputs, commonjs and esm? |
@yolio2003 Are you trying to use |
no, just need emitApiClient to be correct.
yes, i run with can we only deps on
so the question is, should the clientApi step should only deps on these ?
|
Sorry, we suggest to run It will be a mess if we try to support ESM now. Maybe in the future that the ecosystem is more stable, and the tools around ESM support are more complete, it is time for us to move forward the ESM way. |
ok just discuss the clientApi codegen's dependences. that's ok. |
farrow-api-client
, so i can use it quicklyThe text was updated successfully, but these errors were encountered: