Git Product home page Git Product logo

habito-webpack-talk's Introduction

habito-webpack-talk

Running the team through configuring Webpack.

Setup

At the top level of the repository you can run yarn once and (thanks to workspaces) it will install dependencies for all the subprojects.

From steps 6-11 you will need to run npx bower install inside each subdirectory to install the PureScript dependencies.

Steps

Each subdirectory is a self-contained project demonstrating a particular piece of Webpack configuration. The steps follow on from one another: so step 4 advances from step 3, and so on. Each step has comments to highlight the changes from the previous stage.

The steps are:

  1. Basic entry points and output
  2. Add html-webpack-plugin and yarn serve to view the project in a browser
  3. Load CSS
  4. Load SASS
  5. Load assets
  6. Load PureScript
  7. Hash output names
  8. Clean the dist directory before building
  9. Extract CSS to a file
  10. Optimise images
  11. Add webpack-dev-server

To see the build output of a step, run yarn build within the subdirectory. This invokes Webpack; see the package.json for the full command that gets run.

From step 2 onwards you can also run yarn serve, which spins up a simple HTTP server so that you can see the build output in your browser. Note that this is not a Webpack feature.

habito-webpack-talk's People

Contributors

elliotdavies avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.