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

Can't transpile browser validation like in example for IE11 (i.e. non-modern browsers) #6740

Closed
mkastner opened this issue Jul 18, 2018 · 2 comments
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Milestone

Comments

@mkastner
Copy link

mkastner commented Jul 18, 2018

Using:
mongoose 5.2.4
webpack: 4.16.1
webpack-cli: 3.0.8
babel-cli: 6.26.0
babel-preset-es2015: 6.24.1
babel-loader: 7.1.5
node: 8.11

Do you want to request a feature or report a bug?

A Bug

What is the current behavior?

Browser version is not being transpiled to IE11 runnable code. E.g. arrow functions are still in the resulting code.

If the current behavior is a bug, please provide the steps to reproduce.

Example can be checked out here.

https://github.com/mkastner/mk-mongoose-browser

Then run "yarn build" and have a look at file "dist/main.js".

What is the expected behavior?

There should not be (amongst other things e.g. "const") any arrow functions.

Please mention your node.js, mongoose and MongoDB version.

node 8.11 but also node 9.x and 10.x

Addendum

lI finally got it running on ie11. You should definitely also add the .babelrc configuration for those not familiar with webpack/babel in the documentation. Your webpack is not working with ie otherwise for "older browsers" (which is more or less a synonym for ie).

But now the validator code adds 1MB!!! to my webpack code. Why?

@vkarpov15
Copy link
Collaborator

What did you have to do to get it running in ie11?

@vkarpov15 vkarpov15 added this to the 5.2.6 milestone Jul 22, 2018
@vkarpov15 vkarpov15 added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Jul 22, 2018
@vkarpov15 vkarpov15 modified the milestones: 5.2.6, 5.2.7, 5.2.9 Jul 30, 2018
@vkarpov15 vkarpov15 modified the milestones: 5.2.9, 5.2.11 Aug 17, 2018
@vkarpov15 vkarpov15 modified the milestones: 5.2.12, 5.2.13 Aug 29, 2018
@vkarpov15 vkarpov15 modified the milestones: 5.2.16, 5.2.15 Sep 10, 2018
@mkastner
Copy link
Author

Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

No branches or pull requests

2 participants