-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Do you want to request a feature or report a bug?
I want to report a bug in version 3.4.1 of webpack.
What is the current behavior?
Using the [name] or [filebase] templates in the output.filename setting in webpack.config.js leads to the following error message:
ERROR in chunk main [entry]
build/[filebase].js
Path variable [filebase] not implemented in this context: build/[filebase].js
According to the documentation here this should work: https://webpack.js.org/configuration/output/#output-filename
If the current behavior is a bug, please provide the steps to reproduce.
I've created a minimal reproducible example in this gist: https://gist.github.com/50m30n3/c56398e8b95dd4a5fe5aedfa9469c10b
Running webpack
or node run build
will result in the error.
What is the expected behavior?
According to the documentation the original file name or file basename should be substituted into the output file name.
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
I'm running node v8.2.1 and webpack 3.4.1 on Arch Linux.
This issue was moved from webpack/webpack#5394 by @sokra. Orginal issue was by @50m30n3.
The documentation is wrong here. [file]
and [filebase]
is only available in source map filename and not in filename
or chunkFilename
.