Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: ModuleInfoHeaderPlugin needed #9151

Open
stormslowly opened this issue Feb 3, 2025 · 0 comments
Open

[Feature]: ModuleInfoHeaderPlugin needed #9151

stormslowly opened this issue Feb 3, 2025 · 0 comments
Assignees
Labels
feat New feature or request pending triage The issue/PR is currently untouched.

Comments

@stormslowly
Copy link
Contributor

What problem does this feature solve?

add module info header like webpack

/*!**************!*\
  !*** ./a.js ***!
  \**************/
/***/ ((module) => {

module.exports = function a() {
        return "This is a";
};

What does the proposed API of configuration look like?

this plugin respects the config output#pathinfo

ref: https://github.com/webpack/webpack/blob/main/lib/WebpackOptionsApply.js#L245-L250

if (options.output.pathinfo) {
	const ModuleInfoHeaderPlugin = require("./ModuleInfoHeaderPlugin");
	new ModuleInfoHeaderPlugin(options.output.pathinfo !== true).apply(
		compiler
	);
}
@stormslowly stormslowly added the pending triage The issue/PR is currently untouched. label Feb 3, 2025
@stormslowly stormslowly self-assigned this Feb 3, 2025
@stormslowly stormslowly added the feat New feature or request label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

1 participant