I am working on using Zurb Foundation with WebPack and NPM, without Bower.
The problem I am encountering is the same as this below:
https://github.c
It works fine for webpack if you can tell it to ignore the define
test for the troublesome code below:
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined')
module.exports = Reveal;
if (typeof define === 'function')
define(['foundation'], function() {
return Reveal;
});
The best way to do that is to use the imports-loader and set define
to false.
require('foundation-sites/js/foundation.core.js');
require('foundation-sites/js/foundation.util.keyboard.js');
require('foundation-sites/js/foundation.util.box.js');
require('foundation-sites/js/foundation.util.triggers.js');
require('foundation-sites/js/foundation.util.mediaQuery.js');
require('foundation-sites/js/foundation.util.motion.js');
require('imports?define=>false!foundation-sites/js/foundation.reveal.js');