Foundation does not work with create-react-app
I am creating an app with React and create-react-app. I want to use npm foundation sites. I AM:
import React, { Component } from 'react';
import jQuery from 'jquery';
import Foundation from 'foundation-sites';
At this point, even without further code, I get an "Uncaught ReferenceError: jQuery not defined" error coming from foundation.js. Usually people fix this with webpack config, but with create-react-app I don't have access to webpack config. I would not like to do eject
. I tried other solutions like here and nothing seems to work. Can Foundation be used with this setup?
+3
source to share