News for hackers. Stuff that matters.
Re:The state of JavaScript modules by SquareWheel on Monday May 29, 2017 @05:57AM (#14438342)
I know you're trying to be helpful, but I'd like to make clear that if you're a noobie, you don't need any of these tools. Plain Javascript is just fine, especially with the improvements of ES6.

Tools are here to solve problems. Don't bother with them until you have that problem yourself. If you one day decide you want to set up things like auto-minification, image compression, CSS-preprocessing, then look into build script options. Otherwise, it'll just overwhelm you.

Re:The state of JavaScript modules by aaron-lebo on Monday May 29, 2017 @06:03AM (#14438355)
You don't need any of those if you are doing a node project, yeah, but if you want to do any work on the browser, you're gonna need to transpile anyway, so it's something people should be aware of.

Plus it's literally a 20 line config file to do so.

    module.exports = {
        entry: './src/app.js',
        output: {
            path: './bin',
            filename: 'app.bundle.js',
         },
         module: {
             loaders: [{
                 test: /\.js$/,
                 exclude: /node_modules/,
                 loader: 'babel-loader'
             }]
         }
    }
Include your app.bundle.js file in your webpage and you are good to go.
Re:The state of JavaScript modules by nilliams on Monday May 29, 2017 @07:06AM (#14438512)
Soon with the new webpack-cli, you'll just be able to 'webpack init':

https://medium.com/webpack/announcing-the-new-webpack-cli-75...

Re:The state of JavaScript modules by _pmf_ on Monday May 29, 2017 @09:04AM (#14438881)
> Plain Javascript is just fine, especially with the improvements of ES6.

With React pushing hard to use JSX and discontinuing the in-browser JSX-to-JS transformation step, this is no longer completely true. You have to introduce the tooling from the start. (Yes, technologically you are not forced to use JSX and can use JS, but this is clearly declared as unwanted in the React ecosystem.)