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

@craigspaeth - Add prundupify to asset build #1399

Merged
merged 2 commits into from
May 9, 2017

Conversation

broskoski
Copy link
Contributor

Sigh, so after banging my head against this ( #1380 ) for two days, I found this issue: browserify/factor-bundle#51 . Apparently factor-bundle's de-dupe feature is incompatible with our Browserify. Someone in this thread made a browserify plugin which de-dupe's the required modules ( https://github.com/tellnes/prundupify ).

I did a cursory comparison, and it doesn't look like file sizes are much different, but you might know whether this is a bad idea or not. It does however fix the issue that I was getting with importing reaction-force client-side in production.

@craigspaeth
Copy link
Contributor

LGTM! That's an unfortunate issue with factor-bundle, but I'm glad you discovered this plugin. Sorry for the grief!

@craigspaeth craigspaeth merged commit 4ce1292 into artsy:master May 9, 2017
@@ -13,7 +13,7 @@ routes =

'''
/tag
''': require('../apps/tag/client.coffee').init
''': require('../apps/tag/client.js').default.init
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a need to include file extensions when using CoffeeScript? With vanilla JS there’s no need as extensions are registered with require.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default yes, but you can configure this in browserify with extensions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alloy
Copy link
Contributor

alloy commented May 10, 2017

Great job finding the issue, @broskoski 👨‍🎤

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.

3 participants