foxbenjaminfox/vue-async-computed

[BUG] 3.5.1 need to remove the `module` attribute immediately, it breaks webpack build

Closed this issue · 3 comments

Is module a standard property, @mtorromeo? because so far I see its not but only for rollbar. https://stackoverflow.com/questions/42708484/what-is-the-module-package-json-field-for
Also, this is breaking IE11 support because its importing esm version that does not compile function properly. In module, its using es6 formating (i.e. in compiled js, we have get() instead of correct way of function get())
Please remove this config from the package.json if possible. thank you.

ref line: 9e2d046#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R6

module is usable today, and packages such as Vue itself use it, so there isn't really a question about it being non-standard.

It is a bit ambiguous about whether the module is supposed to be pre-transpiled (like main is), or if it should be the uncompiled form.

On one hand, it seems very strange to have transpiled ES5 code, but with export statements (which are most definitely not ES5.) On the other, I see how that could cause problems.

I see that the esm version of Vue is pre-transpiled, so that weighs in favor of that way of doing it. It doesn't seem to have that much of a downside, so I'll release a new version which transpires the module file. That should solve your issues in IE11.

It's used by bundler tools, so if you want you can configure your own build pipeline to transpile it with babel for example.

I've released v3.5.2 which transpiles also dist/vue-async-computed.esm.js (the module file.)

@mtorromeo: Yes, definitely. But I do see that it seems that other projects do transpile the file they list as module in package.json, and it does seem that some people do rely on that. It seems worthwhile to support that use case as well. It's a fairly simple change to the build step to also transpile that file.