gas-webpack-plugin icon indicating copy to clipboard operation
gas-webpack-plugin copied to clipboard

Fails to parse access to import.meta

Open ghost opened this issue 3 years ago • 2 comments
trafficstars

The import.meta is used to get import.meta.url in JS generated by wasm-pack. Could it to be fixed if gas-webpack-plugin allow to use esprima.parseModule with some config option?

I opened an issue in esprima as it didn't work in the online demo. But looking more I found that doc, then maybe the error is in this plugin.

ghost avatar Feb 01 '22 08:02 ghost

@jhernandez-at-wiris

Could it to be fixed if gas-webpack-plugin allow to use esprima.parseModule with some config option?

gas-webpack-plugin use gas-entry-generator to parse javascript source codes. And, gas-entry-generator use esprima.parseModule. Which option in parseModule do you think will solve this problem? And, Could you provide code or a repository that reproduces the issue?

fossamagna avatar Feb 03 '22 00:02 fossamagna

@jhernandez-at-wiris I published v2.3.0. This version contains update to [email protected]. So parse is switched to esprima-next from esprima and add support import.meta from this. Would you be willing to try it?

fossamagna avatar Jun 20 '22 13:06 fossamagna