Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: temporary disable tree-shaking #11586 #11607

Merged
merged 1 commit into from
Nov 23, 2018

Conversation

ncoden
Copy link
Contributor

@ncoden ncoden commented Nov 22, 2018

Description

Despite the previous attempts to make Foundation compatible with tree shaking (#11445, #11497 and #11508), Foundation is used with side-effects (on jQuery) and cannot be considered as "without side-effects" for tree-shaking purposes.

For example:

import $ from 'jquery';
import Foundation from 'foundation-sites'; // may not be included

$(document).foundation();

This pull request removes the "sideEffects: false" label and thus disable tree-shaking support, until the Foundation API and usage is changed to not implicitely rely on the global jQuery object.

Closes #11586

Related to:

Types of changes

  • Documentation
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (anything that would change an existing functionality)
  • Maintenance (refactor, code cleaning, development tools...)

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • The pull request title and template are correctly filled.
  • The pull request targets the right branch (develop or develop-v...).
  • My commits are correctly titled and contain all relevant information.
  • I have updated the documentation accordingly to my changes (if relevant).
  • I have added tests to cover my changes (if relevant).

Despite the previous attempts to make Foundation compatible with tree shaking (foundation#11445, foundation#11497 and foundation#11508), Foundation is used with side-effects (on jQuery) and cannot be considered as "without side-effects" for tree-shaking purposes.

This commit remove the "sideEffects: false" label and thus disable tree-shaking support, until the Foundation API and usage is changed to not implicitely rely on the global jQuery object.

Closes foundation#11586

Related to:
- foundation#11508
- foundation#11497
- foundation#11445
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REGRESSION] Calling $(document).foundation() fails in production builds
1 participant