Giter Site home page Giter Site logo

melroy89 / fastify-node-ts-swc-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 78 KB

TypeScript + Fastify + ES modules + Node-TS demo repo

License: MIT License

JavaScript 42.09% TypeScript 57.91%
es6 es6-modules esm esmodules fastify node-ts nodejs typescript swc fastify-autoload

fastify-node-ts-swc-demo's Introduction

TypeScript + Fastify ESM + Node-TS Demo

Working TypeScript + SWC + Fastify + ES Modules + Node-TS demo. See workaround below.

First install deps via: npm install

Try to excute: npm run dev (this will use Node-TS + SWC)

Or run: npm start

Finally, go to: http://localhost:3000

A fast build using SWC, run: npm run build. If you want to use TSC compiler use: npm run build:prod, which does validate types.


WORKAROUND: We currently apply a workaround by setting VITEST=true to force ESM in Fastify-autoloader. So npm run dev is using:

FASTIFY_AUTOLOAD_TYPESCRIPT=1 VITEST=true node --no-warnings=ExperimentalWarning --loader ts-node/esm src/index.ts

fastify-node-ts-swc-demo's People

Contributors

melroy89 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.