Registry / web-framework / dojo-webpack-plugin

dojo-webpack-plugin

JSON →
library3.0.9jsnpmunverified

Webpack plugin for building Dojo 1.x AMD applications with webpack 5. Current stable version is 3.0.9, maintained on GitHub by OpenNTF. Released continuously with bug fixes and security updates. Differentiators: resolves Dojo AMD modules via webpack, supports synchronous and asynchronous require in packed code, embeds a stripped-down Dojo loader at ~1.5KB for runtime require resolution, handles dojo/text, dojo/has, dojo/i18n loaders, and respects loader config (baseUrl, paths, packages, map, aliases). Requires webpack >=5, tapable >=2, webpack-sources >=2. Alternative to using Dojo's own build system with webpack.

web-frameworkdatabaseauth-security
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Default export. Requires ESM or compatible bundler. CommonJS require() works if using strict CommonJS but not recommended.

import DojoWebpackPlugin from 'dojo-webpack-plugin'

CommonJS users must access .default because the package exports ESM default. Without .default, you get the module object.

const DojoWebpackPlugin = require('dojo-webpack-plugin').default

TypeScript type export; not available at runtime. Use type import only.

import type { Options } from 'dojo-webpack-plugin'

Shows how to configure the plugin in a webpack config with Dojo loader settings including baseUrl, packages, async, locales, and environment.

// webpack.config.js import DojoWebpackPlugin from 'dojo-webpack-plugin'; export default { entry: './src/main.js', output: { path: './dist', filename: 'bundle.js' }, plugins: [ new DojoWebpackPlugin({ loaderConfig: { baseUrl: './src', packages: [ { name: 'dojo', location: 'node_modules/dojo' }, { name: 'app', location: '.' } ], async: true }, environment: { dojoConfig: 'path/to/dojoConfig.js' }, locales: ['en-us', 'fr'] }) ], module: { rules: [ { test: /\.html$/, loader: 'raw-loader' } ] } };
Debug
Known footguns
breakingVersion 3.0.0 only supports webpack 5. Users on webpack 4 must use the v2x branch.
gotchaThe plugin embeds a custom build of the Dojo loader at build time; the Dojo source must be resolvable in node_modules or via loaderConfig. Without it, the build may fail with missing module errors.
gotchaThe default export is ESM-only. Using require('dojo-webpack-plugin') without .default returns the module object, not the constructor.
deprecatedThe 'coerceUndefinedToFalse' option is deprecated and may be removed in future releases.
gotchaThe plugin uses a stripped-down loader for runtime require calls; synchronous require with non-static expressions may not work as expected.
breakingIn v3.0.0, support for webpack 4 was dropped; plugin options related to webpack 4 hooks may be ignored.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
12 hits · last 30 days
gptbot
4
ahrefsbot
4
bytedance
3
script
1
Resources