Coder Social home page Coder Social logo

carloluis / webpack-demo Goto Github PK

View Code? Open in Web Editor NEW
133.0 4.0 31.0 2.34 MB

webpack 4 config. demo :gear:

Home Page: https://carloluis.github.io/webpack-demo/

License: MIT License

JavaScript 85.22% CSS 14.78%
webpack demo webpack4 webpack-dev-server webpack-demo legato es6 tutorial beta

webpack-demo's Introduction

Webpack 4 Demo · Legato 🎶

Demo project to start using and experiment with Webpack 4

GitHub license David

Start

Restore dependencies and start development server:

yarn && yarn dev

Check your browser console at localhost:8080

Features


Webpack

Install webpack

yarn add webpack webpack-cli --dev
More

This project started with Webpack 4 in beta version:

# add webpack 4 (currently on 4.0.0-beta.2)
yarn add webpack@next webpack-cli --dev

Zero Config (#0CJS)

Entry / Output

No need for explicit specify entry and output properties in the webpack configuration.

In Webpack 4 those fields are defaulted to:

{
    "entry": "./src",
    "output": "./dist"
}

Mode

Webpack mode reduce the required configuration for an useful build:

  • development: this mode provide useful error messages and is optimized for speed (unminified bundle)
  • production: enables optimizations out of the box (scope hoisting, tree shaking, minification, etc.)
webpack --mode production

There is also another hidden none mode which disables everything (available only inside the configuration object).

Changes

  • Dropped Node.js 4 support. Therefore, more benefits from ES6 features (optimizations from V8).
  • Sets of defaults with production and development modes.
  • Changes on plugins (Some actives depending on mode. CommonsChunkPlugin was removed)
  • Optimizations, performance boost and many more...
  • Read changeset of Webpack v4.0.0

Articles

License

MIT © Carloluis

webpack-demo's People

Contributors

carloluis avatar dependabot[bot] avatar omgaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

webpack-demo's Issues

Upgrade package dependencies...

Package Current Latest Package Type URL
babel-loader 7.1.5 8.0.4 devDependencies https://github.com/babel/babel-loader
babel-plugin-transform-react-remove-prop-types 0.4.13 0.4.19 devDependencies https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types.git
copy-webpack-plugin 4.5.2 4.5.4 devDependencies https://github.com/webpack-contrib/copy-webpack-plugin
css-loader 0.28.11 1.0.0 devDependencies https://github.com/webpack-contrib/css-loader
file-loader 1.1.11 2.0.0 devDependencies https://github.com/webpack-contrib/file-loader
mini-css-extract-plugin 0.4.1 0.4.4 devDependencies https://github.com/webpack-contrib/mini-css-extract-plugin
node-sass 4.9.2 4.9.4 devDependencies https://github.com/sass/node-sass
react 16.5.0 16.6.0 dependencies https://reactjs.org/
react-dom 16.5.0 16.6.0 dependencies https://reactjs.org/
resolve-url-loader 2.3.0 3.0.0 devDependencies https://github.com/bholloway/resolve-url-loader
sass-loader 7.0.3 7.1.0 devDependencies https://github.com/webpack-contrib/sass-loader
style-loader 0.21.0 0.23.1 devDependencies https://github.com/webpack-contrib/style-loader#readme
webpack 4.17.2 4.23.1 devDependencies https://github.com/webpack/webpack
webpack-cli 3.1.0 3.1.2 devDependencies https://github.com/webpack/webpack-cli#readme
webpack-dev-server 3.1.8 3.1.10 devDependencies https://github.com/webpack/webpack-dev-server#readme

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.