Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript Errors being thrown out in Safari #9409

Closed
lspoor opened this issue Nov 25, 2016 · 9 comments
Closed

Javascript Errors being thrown out in Safari #9409

lspoor opened this issue Nov 25, 2016 · 9 comments

Comments

@lspoor
Copy link

lspoor commented Nov 25, 2016

So I'm getting the following errors:

screen shot 2016-11-25 at 19 23 04

This is only appearing in Safari 9 on my Mac. It appears to be caused by all the foundation files. Has anybody else come across this?

@Deckluhm
Copy link
Contributor

Can you provide more info? When is it happening?

A CodePen reproducing the issue would be really helpful.

@lspoor
Copy link
Author

lspoor commented Nov 26, 2016 via email

@DaSchTour
Copy link
Contributor

After a short look on your app.js it looks like something with your line breaks is messed up because the file is full of /n
I guess it's more a problem of the tool you use to create the app.js or the way you serve it.

@lspoor
Copy link
Author

lspoor commented Nov 28, 2016

Here's my gulpfile that compiles everything, is there any issues here?

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

const elixir = require('laravel-elixir');

elixir.config.publicDir = 'html';
elixir.config.publicPath = 'html';

elixir(function(mix) {
      mix
      .copy(
            './node_modules/foundation-sites/scss', 
            'resources/assets/scss/foundation'
      )

      .copy(
            './node_modules/foundation-sites/js',
            'resources/assets/js/foundation'
      )

      .copy(
            './resources/assets/images',
            'html/images'
      )

      .copy(
            './resources/assets/fonts',
            'html/fonts'
      )

      .copy(
            './resources/assets/js/api',
            'html/js/api'
      )

      .copy(
            './resources/assets/js/libraries',
            'html/js'
      )

      .sass(
            './resources/assets/scss/app.scss', 
            'html/css/style.css'
      )

      .webpack([
            /// Jquery
            './node_modules/jquery/src/jquery.js',

            /// Vue components
            //'vue.js',

            /// Foundation 6 core
            'foundation/foundation.core.js',

            /// Foundation 6 components
            'foundation/foundation.abide.js',
            'foundation/foundation.accordion.js',
            'foundation/foundation.accordionMenu.js',
            'foundation/foundation.drilldown.js',
            'foundation/foundation.dropdown.js',
            'foundation/foundation.dropdownMenu.js',
            'foundation/foundation.equalizer.js',
            'foundation/foundation.interchange.js',
            'foundation/foundation.magellan.js',
            'foundation/foundation.offcanvas.js',
            'foundation/foundation.orbit.js',
            'foundation/foundation.responsiveMenu.js',
            'foundation/foundation.responsiveToggle.js',
            'foundation/foundation.reveal.js',
            'foundation/foundation.slider.js',
            'foundation/foundation.sticky.js',
            'foundation/foundation.tabs.js',
            'foundation/foundation.toggler.js',
            'foundation/foundation.tooltip.js',
            'foundation/foundation.util.box.js',
            'foundation/foundation.util.keyboard.js',
            'foundation/foundation.util.mediaQuery.js',
            'foundation/foundation.util.motion.js',
            'foundation/foundation.util.nest.js',
            'foundation/foundation.util.timerAndImageLoader.js',
            'foundation/foundation.util.touch.js',
            'foundation/foundation.util.triggers.js',

            // Custom Code
            'app.js'
           
      /// Combine in html/js/app.js
      ], 
            'html/js/app.js'
      )

      .version([
            'css/style.css',
            'js/app.js'
      ]);
});

@kball
Copy link
Contributor

kball commented Nov 28, 2016

I'm looking into this and definitely somewhat confused... so it looks like webpack is putting everything together and evaling them... but when I copy out that eval into safari it works fine for me... I would definitely lean towards it being a webpack config issue but I'm not knowledgeable enough about webpack to tell you what it is. @mrsweaters you're a webpack guru now, can you help out?

@lspoor
Copy link
Author

lspoor commented Nov 28, 2016

Any ideas why the errors are only showing in specific browsers too? Let me know if you need to view anything else from my project code!

@colin-marshall
Copy link
Contributor

@lspoor is this still an issue?

@lspoor
Copy link
Author

lspoor commented Feb 3, 2018

No idea tbh, I use the CLI whenever I'm using Sites now and don't recall any issues with the current version(s)

@lspoor lspoor closed this as completed Feb 3, 2018
@colin-marshall
Copy link
Contributor

Thanks for responding!

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

No branches or pull requests

5 participants