inveniosoftware / inveniosoftware/flask-webpackext

"Usage" page of documentation is outdated

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
13
Forks
11
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug
When i tried to follow the steps described in the documentation ([usage page](https://flask-webpackext.readthedocs.io/en/latest/usage.html)) i was facing following error while building the assets:

```
> webpack --config webpack.config.js

[webpack-cli] TypeError: Cannot read property 'length' of undefined
at /home/fwoerister/PycharmProjects/webpack/instance/assets/node_modules/webpack-manifest-plugin/lib/plugin.js:129:39
at Array.reduce ()
at ManifestPlugin. (/home/fwoerister/PycharmProjects/webpack/instance/assets/node_modules/webpack-manifest-plugin/lib/plugin.js:116:26)
at Hook.eval [as callAsync] (eval at create (/usr/lib/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/usr/lib/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.emitAssets (/usr/lib/node_modules/webpack/lib/Compiler.js:862:19)
at /usr/lib/node_modules/webpack/lib/Compiler.js:450:10
at processTicksAndRejections (internal/process/task_queues.js:77:11)
```

## Steps to Reproduce
Following the steps described on the ["usage" page](https://flask-webpackext.readthedocs.io/en/latest/usage.html) of the documentation.

## Expected behavior
The assets should be built without error

## Additional context
After some investigation I realized that this error was a [known issue](https://github.com/shellscape/webpack-manifest-plugin/pull/224), that was fixed in a more recent version of the plugin. I also found out that in the more recent versions the plugin class was renamed from "ManifestPlugin" to "WebpackManifestPlugin" which has to be fixed in the webpack config as well.

Contributor guide

Open the contributing guide

Research direction

Start with the linked usage page and the webpack config used by its steps. Check the documented webpack-manifest-plugin version and class name against the current plugin behavior; done means the documented process and configuration build the assets without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python, webpack
Domain
build-system, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.