{"library":"webpack-preprocessor","type":"library","category":null,"description":"A webpack loader that strips or keeps code blocks based on preprocessor directives like `#if`, `#elif`, `#else`, `#endif`, supporting JavaScript and HTML files. It uses a declarative syntax similar to C preprocessor. Version 0.1.12 is the latest, but the project appears unmaintained (last commit years ago). Key differentiators: simple condition syntax, supports nested logic, and works with webpack 1/2 loaders. Alternatives like preprocess-loader or webpack-strip-block may be more modern.","language":"javascript","status":"abandoned","version":"0.1.12","tags":["javascript","webpack","webpackloader","preprocessor"],"last_verified":"Wed May 27","install":[{"cmd":"npm install webpack-preprocessor","imports":["import webpackPreprocessor from 'webpack-preprocessor'; // as webpack loader rule","{ test: /\\.js$/, loader: 'webpack-preprocessor' }","loader: 'webpack-preprocessor?definitions=[\"dev\",\"stage\"]'"]},{"cmd":"yarn add webpack-preprocessor","imports":[]},{"cmd":"pnpm add webpack-preprocessor","imports":[]}],"homepage":null,"github":"https://github.com/Marc-Andre-Rivet/webpack-preprocessor","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/webpack-preprocessor","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/webpack-preprocessor/compatibility"}}