GithubHelp home page GithubHelp logo

jiangweixian / webpack-eliminate-loader Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3.54 MB

speed-up your webpack build

License: MIT License

JavaScript 2.70% TypeScript 95.79% Smarty 1.51%
react webpack webpack-loader build-in-need speed-up

webpack-eliminate-loader's Introduction

webpack-eliminate-loader

speed up build

npm GitHub

Limits

only speed-up webpack in development mode build up.

Useage

see more examples

npm install webpack-eliminate-loader --save-dev

In webpack, put after at the bottom.

// ... other loaders
{
  loader: 'webpack-eliminate-loader',
  options: {
    exclude: ['src/pages/Home'],
    preset: ['react-route'],
  },
},

In webpack-chain, put after at the bottom.

// ... other loaders
const tsUse = config.module.rules.get('ts');
tsUse
  .use('webpack-eliminate-loader')
  .loader('webpack-eliminate-loader')
  .options({
    presets: ['umi-route', 'umi-rematch'],
    include: ['src/pages/page-one'],
  })
  .after('ts-loader');

Options

Options Usage Default
presets the way of how this loader work. Currently, only support umi-route, react-route, umi-rematch(need works with *-route)
include glob-pattern-like string, only build-up pages-in-include, we will have some default include pages []
exclude glob-pattern-like string, will not build-up pages-in-exclude []

NOTE:

In future, it may support custom-preset. For now, if you want use offical presets, you need keep same project-pages-structure like examples

  • react-route - examples/basic-react
  • umi-route and umi-rematch - examples/umi-react

webpack-eliminate-loader's People

Contributors

jiangweixian avatar

Watchers

 avatar  avatar

webpack-eliminate-loader's Issues

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.