{"id":18684,"library":"primitive-script-bundler","title":"Primitive Script Bundler","description":"A minimal JavaScript bundler inspired by Webpack, designed for simple projects that need to concatenate multiple script files into a single bundle. Version 1.0.16 is the latest stable release, with infrequent updates. Unlike Webpack or Rollup, it offers no module resolution, tree-shaking, or code splitting; it simply concatenates files in order. Suitable for small hobby projects but not for production use. Not actively maintained.","status":"active","version":"1.0.16","language":"javascript","source_language":"en","source_url":"https://github.com/andersontr15/primitive-script-bundler","tags":["javascript"],"install":[{"cmd":"npm install primitive-script-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add primitive-script-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add primitive-script-bundler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is CommonJS-only; does not support ESM imports.","wrong":"import bundle from 'primitive-script-bundler';","symbol":"bundle","correct":"const bundle = require('primitive-script-bundler');"},{"note":"Configuration is read from a config.json file automatically; no API to pass config programmatically.","wrong":"","symbol":"config","correct":"// No explicit import, uses config.json in project root"},{"note":"The default export is a function; call it directly.","wrong":"bundle.bundle();","symbol":"runBuild","correct":"bundle();"}],"quickstart":{"code":"// config.json\n{\n  \"files\": [\"src/a.js\", \"src/b.js\"],\n  \"output\": \"dist/bundle.js\"\n}\n\n// index.js\nconst bundle = require('primitive-script-bundler');\nbundle();","lang":"javascript","description":"Shows how to configure files and output path via config.json and run the bundler."},"warnings":[{"fix":"Manually order your files so that dependencies appear before dependents.","message":"The package does not resolve import/require statements. Files are concatenated exactly in the order specified in config.json.","severity":"gotcha","affected_versions":"*"},{"fix":"Pipe bundle through tools like terser or uglify-js.","message":"The output bundle is not minified. You must use an external minifier for production.","severity":"gotcha","affected_versions":"*"},{"fix":"Pre-process files with Babel or TypeScript compiler before bundling.","message":"No support for TypeScript, JSX, or any transpilation. Only plain JavaScript.","severity":"gotcha","affected_versions":"*"},{"fix":"Consider alternatives like Webpack, Rollup, or esbuild for active support.","message":"The package is not actively maintained; last update was over two years ago.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install primitive-script-bundler' in your project root.","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'primitive-script-bundler'"},{"fix":"Use const bundle = require('primitive-script-bundler'); then bundle();","cause":"Incorrect import; likely used default import with ESM syntax.","error":"TypeError: bundle is not a function"},{"fix":"Create a config.json file in the same directory with the required files and output fields.","cause":"The config.json file is missing from the root directory where the script is run.","error":"Error: Config file not found: config.json"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}