{"library":"exports-loader","type":"library","category":null,"description":"Webpack loader that adds export statements to source files that lack them. Current stable version is 5.0.0 (Jan 2024), requiring Node.js >=18.12.0 and webpack^5.0.0. Commonly used for shimming legacy scripts, vendor files, or modules that do not expose exports. Supports inline query configuration and webpack rule options to generate named or default ES module exports (default) or CommonJS module.exports. Key differentiator: declarative, composable with other loaders; simpler than writing wrapper modules. No security incidents reported.","language":"javascript","status":"active","version":"5.0.0","tags":["javascript","webpack"],"last_verified":"Wed May 27","install":[{"cmd":"npm install exports-loader","imports":["import { foo } from 'exports-loader?exports=foo!./file.js'","const { foo } = require('exports-loader?type=commonjs&exports=foo!./file.js')","module: { rules: [ { test: require.resolve('./vendor.js'), loader: 'exports-loader', options: { exports: 'myFunc' } } ] }"]},{"cmd":"yarn add exports-loader","imports":[]},{"cmd":"pnpm add exports-loader","imports":[]}],"homepage":"https://webpack.js.org/loaders/exports-loader/","github":"https://github.com/webpack-contrib/exports-loader","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/exports-loader","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/exports-loader/compatibility"}}