Menu icon Foundation
Failed build React.js

I have encountered an error msg when running the buildprocess för React.js. It says:

Failed to minify the code from this file:

        ./node_modules/foundation-sites/js/foundation.util.core.js:24

Anyone seen this, have a solution?

Error msg takes me to this link; http://bit.ly/2tRViJ9, says that code isn't compiled to ES5 before published to npm.

React.jsnpmbuild production

I have encountered an error msg when running the buildprocess för React.js. It says:

Failed to minify the code from this file:

        ./node_modules/foundation-sites/js/foundation.util.core.js:24

Anyone seen this, have a solution?

Error msg takes me to this link; http://bit.ly/2tRViJ9, says that code isn't compiled to ES5 before published to npm.

Prafull Chandra Sharma 3 months ago

Yes Foundation Sites script is not ES5 transpiled, I got that issue too in my project.
You have to include Foundation module folder babel-loader.

{
test: /\.(js|jsx|mjs)$/,
include: [paths.appSrc, paths.foundationSrc], // foundation sites folder path added to babel-loader
loader: require.resolve('babel-loader'),
options: {
compact: true,
},
},


If you are using create-react-app for you project you have to eject first.