Git Product home page Git Product logo

Comments (5)

UnsungHero97 avatar UnsungHero97 commented on May 11, 2024 2

Anytime :) I just went through this exercise not too long ago... was a bit overwhelmed by everything. There's certainly a place for a well put-together guide on getting started with a modern JS stack, or rather, putting one together from scratch.

from js-stack-from-scratch.

verekia avatar verekia commented on May 11, 2024 1

I didn't know that, thanks for the tip! Will update the tutorial asap. I found that it's also possible with gulpfile.babel.js, pretty neat :)

from js-stack-from-scratch.

verekia avatar verekia commented on May 11, 2024 1

@saitonakamura This is why I use Babel on the server as well. Every import in this tutorial ends up as a require in the lib directory, even server code.

from js-stack-from-scratch.

verekia avatar verekia commented on May 11, 2024

Fixed! Thank you very much :)

from js-stack-from-scratch.

saitonakamura avatar saitonakamura commented on May 11, 2024

ES6 is awesome but using import can cause problems.
For example this file is executed by node, like node --harmony server.js and I'm using it to enable hot reloading.
But I can't use import in here because node harmony mode does not support import and the main cause of this that there is problems with implementation import in V8, see this thread.
So I'm still using require in code that executes on server (such as using js wrappers for webpack, webpack-dev-middleware, webpack-hot-middleware) and recommend you to do so.
AFAIK you can use export, but I find it violating the POLA to use export and not to use import in one file.
Other cool features like const, let are available using --harmony flag by the way.

from js-stack-from-scratch.

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.