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@doyakovlev/arui-scripts@docusaurus/bundler@dlab/cra-universal@clusterio/plugin-edge_transports@clusterio/web_ui@doweb/vuexpress@botonic/dx@botxo_team/fe-shared@bentley/backend-webpack-tools@pravdomil/blocksblomjarbjade-react-loader-examplejitsi-meet-stepupjitsi-fmtechiqiyi_game_wp_clikarma-webpack-bundlekhoomlandrwi-layer-react-express@aws-crypto/integration-browsersprout-web-uistringoverflowugnis-testtj-temptiflyui-managerumi-plugin-ssrtheme-patternfly-orgtix-react-ssrtradie-template-react-apptradie-template-react-static-site@amille/dev-scripts@arcgis/webpack-plugin@ascorbic/gatsby@app-proto/ify@anaphasejs/core@amollo-assy/webpack-tsx-app@asep.setiawan/react-tool-kit@atls/code-runtime@availity/workflow-plugin-angular@alfa-code/alfa-code-scripts@bestminr/build@bloomreach/frontend-build@bodiless/next@brudi-toolbox/webapp-dev@brudi/brudi-toolbox-react-webapp@breakaway/theme-patternfly-org@breakaway/documentation-framework@clodeo/react-script1fl5htp@7hci/gatsby-pge@hokify/nuxt-haxios-module@bentley/webpack-tools@bookshop/jekyll-extract@boundstate/tier-one-dgeni
4.0.1

5 years ago

4.0.0

5 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

0.1.1

10 years ago

0.1.0

11 years ago