-
Notifications
You must be signed in to change notification settings - Fork 311
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
Publish ES module #192
Comments
I think we would also need to fix cross-fetch to get graphql-request working in Vite. |
I just tried to use graphql-request with a |
@justinfagnani same here. Did you find a solution for this? |
As for @web/dev-server I'm using the rollup plugin commonjs. This fixes the exports for now, but it doesn't work yet. web-dev-server now tries to resolve "util". I think it's because it's trying to resolve cross-fetch with node-fetch instead the browser variant? + import { fromRollup } from '@web/dev-server-rollup';
+ import commonjs from '@rollup/plugin-commonjs';
+ const rollupCommonjs = fromRollup(commonjs);
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
nodeResolve: true,
open: '/',
plugins: [
+ rollupCommonjs(),
],
}); |
Same here again. Any working solutions? |
The workaround for me was to use package.json
web-install.js (any script name will work):
I'm also using |
Hey everyone, I'm interested in publishing a proper ESM soon, more info here #359. |
I'm back on this now. |
Vite does not work well with commonjs module. In this case all named exports are inaccessible in vite build.
The text was updated successfully, but these errors were encountered: