{"id":26482,"library":"tiny-webpack","title":"tiny-webpack","description":"A JavaScript bundler mimicking Webpack's core features including loader/plugin systems, code splitting, tree shaking, dynamic imports, and multi-page application support. Currently at version 0.0.1-alpha.1 (pre-release) with no stable release. Designed as a lightweight alternative for learning or simple projects, but lacks production readiness. Differentiators include a simplified API and Webpack-compatible configuration, but it is not suitable for production use.","status":"active","version":"0.0.1-alpha.1","language":"javascript","source_language":"en","source_url":"https://github.com/Sunny-117/jspack","tags":["javascript","typescript"],"install":[{"cmd":"npm install tiny-webpack","lang":"bash","label":"npm"},{"cmd":"yarn add tiny-webpack","lang":"bash","label":"yarn"},{"cmd":"pnpm add tiny-webpack","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The only named export; ESM-only (no CJS wrapper)","wrong":"const jspack = require('tiny-webpack')","symbol":"jspack","correct":"import { jspack } from 'tiny-webpack'"},{"note":"No default export; must use named import { jspack }","wrong":"module.exports = require('tiny-webpack')","symbol":"default export","correct":"import jspack from 'tiny-webpack'"},{"note":"TypeScript types bundled; use type import for options interfaces","wrong":"import { JspackOptions } from 'tiny-webpack'","symbol":"types","correct":"import type { JspackOptions } from 'tiny-webpack'"}],"quickstart":{"code":"// jspack.config.js\nexport default {\n  entry: './src/index.js',\n  output: {\n    path: process.cwd() + '/dist',\n    filename: 'bundle.js'\n  },\n  mode: 'development'\n};\n\n// build.js\nimport { jspack } from 'tiny-webpack';\nimport config from './jspack.config.js';\n\nconst compiler = jspack(config);\ncompiler.run((err, stats) => {\n  if (err) {\n    console.error(err);\n    return;\n  }\n  console.log(stats.toJson());\n});","lang":"javascript","description":"Basic usage of tiny-webpack: configuration and programmatic build."},"warnings":[{"fix":"Do not use in production; pin exact version and expect breaking changes.","message":"Alpha version – no stable API; exports may change without notice.","severity":"breaking","affected_versions":"0.0.1-alpha.x"},{"fix":"Use ESM imports or upgrade Node.js to support ESM.","message":"Uses ESM only; CommonJS require() will fail.","severity":"gotcha","affected_versions":"*"},{"fix":"Use named import syntax.","message":"No default export; must import { jspack }.","severity":"gotcha","affected_versions":"*"},{"fix":"Write your own plugins or use Webpack for plugin ecosystem.","message":"No pre-built plugins; must implement custom loaders/plugins from scratch.","severity":"gotcha","affected_versions":"*"},{"fix":"Use standard node_modules resolution.","message":"resolveLoader.modules is not officially supported; may be removed.","severity":"deprecated","affected_versions":">=0.0.1-alpha.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use import { jspack } from 'tiny-webpack' or set type: 'module' in package.json.","cause":"tiny-webpack is ESM-only; using CommonJS require() fails.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported."},{"fix":"Use import { jspack } from 'tiny-webpack' instead of import jspack from 'tiny-webpack'.","cause":"Attempted to import default export which does not exist.","error":"TypeError: jspack is not a function"},{"fix":"npm install style-loader less-loader --save-dev","cause":"Required loaders are not included with tiny-webpack; must be installed separately.","error":"Module not found: Can't resolve 'style-loader'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}