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

Utilise prepackFromAst #6

Open
gajus opened this issue May 3, 2017 · 6 comments
Open

Utilise prepackFromAst #6

gajus opened this issue May 3, 2017 · 6 comments

Comments

@gajus
Copy link
Owner

gajus commented May 3, 2017

The prepack method does not allow to utilise source maps. Use prepackFromAst to sourcemap generation.

@gajus
Copy link
Owner Author

gajus commented May 3, 2017

I haven't had time to take a proper look into this, but it appears that UglifyJs plugin is operating on the AST level.

https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/master/src/index.js

@gajus
Copy link
Owner Author

gajus commented May 3, 2017

@montogeek Do you happen to have experience with this?

@montogeek
Copy link

@gajus No, no really

@jsonnull
Copy link

I just took a look at the prepack source, and the prepackFromAst method currently ignores the AST and parses the code identically to the prepack method.

I'm thinking this means that sourcemaps just aren't possible with the current state of prepack. Can somebody confirm?

@Bnaya
Copy link

Bnaya commented Jun 4, 2017

So if i understand correctly, source maps aren't working on that moment?

@gajus
Copy link
Owner Author

gajus commented Jun 4, 2017

So if i understand correctly, source maps aren't working on that moment?

As far as I understand, source maps do not work at all with Prepack.

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

No branches or pull requests

4 participants