{"id":20740,"library":"webpack-core","title":"webpack-core","description":"The shared core of webpack and enhanced-require, encapsulating loader mechanics and SourceMap handling. Version 0.6.9 is the latest (no longer maintained; last release 2014). It is not intended as a standalone module but provides infrastructure for custom loaders and plugins. Webpack 1.x used this; later versions replaced it with webpack-sources and internal refactoring. Key differentiator: it was the foundational runtime for webpack's loader pipeline before being absorbed into webpack proper. Requires Node >=0.6.","status":"deprecated","version":"0.6.9","language":"javascript","source_language":"en","source_url":"https://github.com/webpack/core","tags":["javascript"],"install":[{"cmd":"npm install webpack-core","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-core","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-core","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CommonJS requires the full path: const SourceMapSource = require('webpack-core/lib/SourceMapSource');","wrong":"const SourceMapSource = require('webpack-core').SourceMapSource;","symbol":"SourceMapSource","correct":"import { SourceMapSource } from 'webpack-core'"},{"note":"Use named import; default export does not exist.","wrong":"const RawSource = require('webpack-core');","symbol":"RawSource","correct":"import { RawSource } from 'webpack-core'"},{"note":"CommonJS: const ModuleFilenameHelpers = require('webpack-core/lib/ModuleFilenameHelpers');","wrong":"import ModuleFilenameHelpers from 'webpack-core';","symbol":"ModuleFilenameHelpers","correct":"import { ModuleFilenameHelpers } from 'webpack-core'"}],"quickstart":{"code":"const webpack = require('webpack');\nconst config = {\n  entry: './src/index.js',\n  output: { path: './dist', filename: 'bundle.js' },\n  module: { loaders: [{ test: /\\.js$/, loader: 'babel' }] },\n  plugins: []\n};\nwebpack(config, (err, stats) => {\n  if (err) console.error(err);\n  else console.log(stats.toString());\n});","lang":"javascript","description":"Shows basic webpack usage (webpack-core is not used standalone)."},"warnings":[{"fix":"Upgrade to webpack 2 or later.","message":"webpack-core is no longer maintained. Use webpack >= 2.0 which includes its own core.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Do not import directly; use webpack's public API.","message":"Not a standalone module; requires webpack context.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install webpack (includes webpack-core internally).","cause":"Package not installed; webpack-core is internal and not published separately.","error":"Cannot find module 'webpack-core'"},{"fix":"Use: const SourceMapSource = require('webpack-core').SourceMapSource;","cause":"Incorrect import path.","error":"Module not found: Error: Cannot resolve module 'webpack-core/lib/SourceMapSource'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}