You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Run npx create-react-app my-app
Run cd my-app
Run yarn add jquery foundation-sites@6.5.0-rc.3
Add import 'foundation-sites'; to src/index.js
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.
The text was updated successfully, but these errors were encountered:
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).
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:
Steps to Reproduce
How to reproduce:
npx create-react-app my-app
cd my-app
yarn add jquery foundation-sites@6.5.0-rc.3
import 'foundation-sites';
tosrc/index.js
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
node:10
(Debian) and innode:10-alpine
Checklist
The text was updated successfully, but these errors were encountered: