{"library":"val-loader","type":"library","category":null,"description":"A webpack loader that executes a given module at build-time and returns the result as the module's code. Current stable version is 6.0.0 (2024-01-15). It allows custom loader logic without writing a full loader; the target module receives (options, loaderContext) and must return an object with at least a 'code' property. Supports returning source maps, AST, dependencies, and context dependencies. Requires webpack 5.x and Node.js >= 18.12.0. Releases follow semver, with breaking changes only for Node.js and webpack version bumps. Key differentiator: simplifies creating loaders for static value generation or compile-time computation.","language":"javascript","status":"active","version":"6.0.0","tags":["javascript","webpack","loader","execute","val"],"last_verified":"Wed May 27","install":[{"cmd":"npm install val-loader","imports":["module.exports = { module: { rules: [ { test: /\\.js$/, use: 'val-loader' } ] } }","module.exports = (options, loaderContext) => { return { code: '...' }; }","options: { executableFile: path.resolve(__dirname, 'exec.js') }"]},{"cmd":"yarn add val-loader","imports":[]},{"cmd":"pnpm add val-loader","imports":[]}],"homepage":null,"github":"https://github.com/webpack-contrib/val-loader","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/val-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/val-loader/compatibility"}}