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

Remove JS Doc comments from custom function defintion #617

Open
xMarcinator opened this issue Oct 6, 2021 · 0 comments
Open

Remove JS Doc comments from custom function defintion #617

xMarcinator opened this issue Oct 6, 2021 · 0 comments

Comments

@xMarcinator
Copy link

When bundling with a function to global space it copies the JS DOC as the purpose of the plugin but would it be possible to remove the comment from the function definition in production mode to keep comments to a minimum.

In practice would this code:

/**
 * Return write arguments.
 * @customfunction
 */
function echo() {
}

//webpack stuff

var echo = () => console.log('hello');
/**
 * Return write arguments.
 * @customfunction
 */
__webpack_require__.g.echo = echo;

/******/ })()
;

Become this:

/**
 * Return write arguments.
 * @customfunction
 */
function echo() {
}

//webpack stuff

var echo = () => console.log('hello');
__webpack_require__.g.echo = echo;

/******/ })()
;

(Sorry if I'm doing this wrong this is my first issue submission)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant