dora-plugin-webpack
raw JSON → 1.0.0 verified Sat Apr 25 auth: no javascript
A plugin for dora that provides webpack integration for development and build purposes. Version 1.0.0 is the current stable release. It allows running webpack via dora with options such as custom config path, publicPath, and verbose logging. This plugin is part of the dora ecosystem and is maintained as part of the dora-js organization. It is useful for projects that use atool-build and dora together.
Common errors
error Error: Cannot find module 'atool-build' ↓
cause Missing peer dependency atool-build.
fix
npm install atool-build@1.x --save-dev
error Warning: dora version mismatch, expected 0.4.x ↓
cause Dora version is not 0.4.x.
fix
Use dora@0.4.x or update dora-plugin-webpack if available.
Warnings
gotcha Plugin expects dora version 0.4.x; using newer versions may cause incompatibility. ↓
fix Use dora@0.4.x or check compatibility with newer dora versions.
gotcha The plugin does not work without atool-build as a peer dependency. ↓
fix Install atool-build at version 1.x alongside dora-plugin-webpack.
gotcha Options passed via query string must be URL-encoded or properly quoted in CLI. ↓
fix Use quotes: dora --plugins "webpack?publicPath=/app"
Install
npm install dora-plugin-webpack yarn add dora-plugin-webpack pnpm add dora-plugin-webpack Imports
- default wrong
const doraPluginWebpack = require('dora-plugin-webpack')correct// Plugin is used via CLI, e.g., dora --plugins webpack
Quickstart
// Install dependencies
npm install dora dora-plugin-webpack atool-build --save-dev
// Add scripts in package.json
"scripts": {
"start": "dora --plugins webpack"
}
// Create webpack.config.js
module.exports = {
entry: './index.js',
output: {
path: './dist',
filename: 'bundle.js'
}
};
// Run
npm start
// With options:
dora --plugins "webpack?publicPath=/my-app&verbose"