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

npm run dev: Entry module "src/server.js" is implicitly using "default" export mode #4

Open
pascalandy opened this issue Jan 6, 2021 · 2 comments

Comments

@pascalandy
Copy link

pascalandy commented Jan 6, 2021

It's just annoying :-p. You can see my fork here.

Thanks for all the work!

npm run dev

> ssg_sapper@0.0.1 dev /Volumes/ssg_sapper
> run-p watch:*

> ssg_sapper@0.0.1 watch:css /Volumes/ssg_sapper
> postcss src/assets/global.pcss -o static/global.css -w

> ssg_sapper@0.0.1 watch:dev /Volumes/ssg_sapper
> sapper dev

• server
Entry module "src/server.js" is implicitly using "default" export mode, which means for CommonJS output that its default export is assigned to "module.exports". For many tools, such CommonJS output will not be interchangeable with the original ES module. If this is intended, explicitly set "output.exports" to either "auto" or "default", otherwise you might want to consider changing the signature of "src/server.js" to use named exports only.
✔ client (5.6s)
> Listening on http://localhost:3000
@b-d-m-p
Copy link

b-d-m-p commented Jan 11, 2021

@pascalandy Does your fork fix it? I took a look at your commits and I don't think it does. Let me know if I am wrong.

I figured out how to stop the error, but I am not sure if setting it to 'default', which is what I did, is the correct solution.

To disable it, in rollup.config.js set the indicated line to be as written below.

export default {
client: {...},
server: {
	input: config.server.input(),
       // this line will fix the error. 
	output: {...config.server.output(), exports: 'default'},
...

thgh/vercel-sapper#54 (comment)

@pascalandy
Copy link
Author

pascalandy commented Jan 11, 2021

Oh yes thanks! I fixed it in my branch 'edge'. We have the same fix :)

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

2 participants