4.0.1 • Published 5 years ago

null-loader v4.0.1

Weekly downloads
902,075
License
MIT
Repository
github
Last release
5 years ago

npm node deps tests chat size

null-loader

A webpack loader that returns an empty module.

One use for this loader is to silence modules imported by a dependency. Say, for example, your project relies on an ES6 library that imports a polyfill you don't need, so removing it will cause no loss in functionality.

Getting Started

To begin, you'll need to install null-loader:

$ npm install null-loader --save-dev

Then add the loader to your webpack config. For example:

// webpack.config.js
const path = require('path');

module.exports = {
  module: {
    rules: [
      {
        // Test for a polyfill (or any file) and it won't be included in your
        // bundle
        test: path.resolve(__dirname, 'node_modules/library/polyfill.js'),
        use: 'null-loader',
      },
    ],
  },
};

And run webpack via your preferred method.

Contributing

Please take a moment to read our contributing guidelines if you haven't yet done so.

CONTRIBUTING

License

MIT

wti-form-source-code@kova/antd-less@kova/less@asep.setiawan/react-kit@jerryhorak/docusaurus-coregintonic@deriv/traderdowebtempfix-for-version-one-point-one-point-threereact-unity-scripts@dewen_li/gatsby-theme-bodilessecp-frontendpeach-clieatpro-ssrcorifeus-builder-angularlyrahealth-uicorearch3pugworkhzero-webpack-scripts@wownikcompany/frontend-corereact-application-base@futurelearn/webpack-configtealess-helpers@infinitebrahmanuniverse/nolb-nulwebpack-kit@everything-registry/sub-chunk-2354app-noolsnbc-paas-webpacksnbc-paas-webpack-scriptscpaas-webpack-scriptsmember-easy-mobile-v1next-plugin-antd-designsyncano-gatsbyvue-cli-plugin-docgenwebcompilerwpi-react-hmr-ssrwildplatestoke-react-scriptsstrapi-helper-plugin-testvue-cli-plugin-weexuwfvue-cli-plugin-ktghvue-cli-plugin-vuetifyvue-easy-renderervue-cli-plugin-rishiqing@botonic/dx@botxo_team/fe-shared@bentley/backend-webpack-tools@pravdomil/blocksblomjarbjade-react-loader-examplejitsi-meet-stepupjitsi-fmtechiqiyi_game_wp_clikarma-webpack-bundlekhoomlandrhulixhyperapp-toolshaxe-loaderhelloxyzklmgulu-bumbleloch-nessmadewithlove-karma-configlpack-ts-react-apollokytlambda-webpacklci-core-tile-roikoa-vuessr-middleware@wardpeet/gatsby@web-steps/config@wpefintech/react-tool-kit@webiny/project-utils@wuzzle/cli@ubiquits/toolchain@throttleup/gatsby@tiket-com/react-script@thefoxjob/paperwork@tramvai/cli@zalastax/nolb-nul@zerothstack/toolchain@teg2405/webpack-plugin-vuetify@termite/builder@zousdie/vue-cli-plugin-ssra-chart-testaegis-toolsameinfo-helper-pluginatomic-reactorauspiceauspice-revseqbabel-buildart-compiler-ssrapplugins-toolsapp-npllarui-scriptsarui-scripts-akitov@clodeo/react-script1fl@clusterio/plugin-edge_transports@clusterio/web_ui
4.0.1

5 years ago

4.0.0

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

0.1.1

11 years ago

0.1.0

11 years ago