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

Fixing snowpack for use in Next.js and hopefully webpack in general #150

Open
lastmjs opened this issue Aug 13, 2021 · 2 comments
Open

Fixing snowpack for use in Next.js and hopefully webpack in general #150

lastmjs opened this issue Aug 13, 2021 · 2 comments

Comments

@lastmjs
Copy link
Contributor

lastmjs commented Aug 13, 2021

I think the problem is that I only have an ES modules output...what I should really have is an ES modules output and a completely plain es5 output. So the package.json will point main to the es5 output and module to the ES modules output.

I am thinking this will solve the issues with Next.js and webpack in general.

@lastmjs
Copy link
Contributor Author

lastmjs commented Aug 13, 2021

The way to achieve this will probably be to use Snowpack with two configuration files...one will do the normal Snowpack build, the other will do a webpack build. Use @snowpack/plugin-webpack

@lastmjs
Copy link
Contributor Author

lastmjs commented Aug 13, 2021

Also, to get the yarn start to work, I believe it is the same error...

so just make a non-commonjs or non-es-modules, just straight javascript build and all of these issues should disappear

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