Skip to content

Move inline babel settings to .babelrc #291

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

Merged
merged 4 commits into from
Apr 27, 2017
Merged

Move inline babel settings to .babelrc #291

merged 4 commits into from
Apr 27, 2017

Conversation

gauravtiwari
Copy link
Member

@gauravtiwari gauravtiwari commented Apr 26, 2017

Related to - #202
Fixes - #202 and #180 and #261

@gauravtiwari
Copy link
Member Author

gauravtiwari commented Apr 26, 2017

@Davidzhu001 Could you please give this branch a try and see if it fixed the production deployment issue for you? gem 'webpacker', github: 'gauravtiwari/webpacker', branch: 'babelrc' and you would need to re-run installers to update/replace webpack config and loaders.

# in Gemfile
gem 'webpacker', github: 'gauravtiwari/webpacker', branch: 'babel
bundle update webpacker
bundle exec rails webpacker:install
bundle exec rails webpacker:install:vue
RAILS_ENV=production bundle exec rails webpacker:compile

@Davidzhu001
Copy link
Contributor

ok, I will test it when I get back.

@Davidzhu001
Copy link
Contributor

Davidzhu001 commented Apr 26, 2017

hooray, it worked! @gauravtiwari And I deployed with Cap too. It works fine on both.

@gauravtiwari
Copy link
Member Author

Awesome 👏 thanks for testing out 🍰

@Davidzhu001
Copy link
Contributor

@gauravtiwari Do you know why the same error showed up again?

@gauravtiwari
Copy link
Member Author

@Davidzhu001 which error?

@Davidzhu001
Copy link
Contributor

#280

@gauravtiwari
Copy link
Member Author

Could you please paste fresh logs and setup you are using? Also, when (something you added/removed) this started happening?

@Davidzhu001
Copy link
Contributor

can i share the code to you? @gauravtiwari . alone with the server access?

@gauravtiwari
Copy link
Member Author

Sure 👍 although not sure I can take a look straightaway. Would that be okay?

@Davidzhu001
Copy link
Contributor

image

@gauravtiwari
Copy link
Member Author

Ahh, same uglify error. Have you tried setting uglify: true in babelrc? - https://babeljs.io/docs/plugins/preset-env/#optionstargets-uglify

@Davidzhu001
Copy link
Contributor

image
@gauravtiwari like these?

@gauravtiwari
Copy link
Member Author

yes that's correct 👍

@Davidzhu001
Copy link
Contributor

@gauravtiwari Thanks it worked

@gauravtiwari
Copy link
Member Author

@Davidzhu001 So, this is the work around for now if you are using es6 code inside vue app. There are other options, but none of them are mature enough to use in production.

@Davidzhu001
Copy link
Contributor

@gauravtiwari ok, can we make a wiki page to show people the solutions?

@gauravtiwari
Copy link
Member Author

gauravtiwari commented May 12, 2017

Perhaps, if you could make a quick PR to add the uglify documentation in README, that would be ace. @RavenXce wrote something here too - #306 (comment)

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

Successfully merging this pull request may close these issues.

2 participants