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

[REGRESSION] Fails to minify #11502

Closed
3 tasks done
josephcsible opened this issue Sep 14, 2018 · 2 comments · Fixed by #11508
Closed
3 tasks done

[REGRESSION] Fails to minify #11502

josephcsible opened this issue Sep 14, 2018 · 2 comments · Fixed by #11508

Comments

@josephcsible
Copy link

What should happen?

Minifying Foundation's code in a React app should succeed, as it has in prior versions.

What happens instead?

Minifying Foundation's code in a React app fails with the following error:

root@51106dca2935:/my-app# yarn build
yarn run v1.9.4
$ react-scripts build
Creating an optimized production build...
Failed to compile.
 
Failed to minify the code from this file: 
 
       ./node_modules/foundation-sites/js/foundation.core.utils.js:24 
 
Read more here: http://bit.ly/2tRViJ9
 
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
root@51106dca2935:/my-app# 

Steps to Reproduce

How to reproduce:

  1. Run npx create-react-app my-app
  2. Run cd my-app
  3. Run yarn add jquery foundation-sites@6.5.0-rc.3
  4. Add import 'foundation-sites'; to src/index.js
  5. Run yarn build

Context

I’d like to be able to use the latest version of Foundation in a React app. This is a regression, as my reproduction steps don't cause the error with Foundation 6.5.0-rc.2.

Your Environment

  • Foundation version(s) used: 6.5.0-rc.3
  • Browser(s) name and version(s): N/A (problem occurs before a browser is involved)
  • Device, Operating System and version: Tested in Docker containers node:10 (Debian) and in node:10-alpine
  • Link to your project: N/A

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • There are no other issues similar to this one.
  • The issue title and template are correctly filled.
@ncoden ncoden self-assigned this Sep 14, 2018
@ncoden
Copy link
Contributor

ncoden commented Sep 14, 2018

Hi @josephcsible 👋,

Thank you for the report. This is probably caused by the react bundler choosing the module entry even if it does not support ES6 packages (they are not transpiled before minification).

I'll take care of this.

@ncoden
Copy link
Contributor

ncoden commented Sep 18, 2018

See #11508

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants