Coder Social home page Coder Social logo

Comments (3)

jedwards1211 avatar jedwards1211 commented on June 16, 2024

@JBBr it already webpacks up many of the server-side files, though not all. I inherited this from Meatier (mainly to make it possible to import CSS files, though that's no longer necessary). I regret the complexity. I should probably just webpack all or none of the server-side code.

Using webpack on the server makes debugging your code or build toolchain problems is much more complicated. In other projects I avoid webpacking server code if I can.

Surely there's a way of getting Typescript support without using Webpack? Can Typescript not compile all your Typescript files over to plain JS files?

from crater.

jthomaschewski avatar jthomaschewski commented on June 16, 2024

@jedwards1211 you are probably right. Thanks for your tips!
I got it working after fiddling around for about an hour.
I configured typescript to emit JS to the build/ directory and spawned the typescript watcher for the server files automatically in the start script.

I published this if others are interested: https://github.com/jbbr/crater/tree/webpack2-typescript

It's not polished and not everything is working and tested.
But it's possible to use TypeScript in both client and server code with proper source mapping and debugging (debugger crashes after code changes when debugging server).

Now I'm interested in getting my unit tests running - this seems to be something not yet covered by crater (only integration tests)

from crater.

jedwards1211 avatar jedwards1211 commented on June 16, 2024

Cool! Yeah the integration tests in crater are only designed to test that all of its scripts and Meteor integration work.

from crater.

Related Issues (20)

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.