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

Regex not compatible IOS / Safari #55

Closed
GautheyValentin opened this issue Oct 15, 2020 · 13 comments
Closed

Regex not compatible IOS / Safari #55

GautheyValentin opened this issue Oct 15, 2020 · 13 comments

Comments

@GautheyValentin
Copy link

Hello,

issuer: /\.\w+(?<!(s?c|sa)ss)$/i,

Create JS crash on Safari / IOS

To tempory fix, i use @1.3.0

If you have a other solution

@arefaslani
Copy link
Member

@GautheyValentin Can I ask which versions of Safari are you using?

@GautheyValentin
Copy link
Author

@arefaslani Hello 14.0 on macOS
You want i provide some screen with error ?

@arefaslani
Copy link
Member

@GautheyValentin Yeah that'd be also nice 👍

@GautheyValentin
Copy link
Author

GautheyValentin commented Oct 20, 2020

@arefaslani Capture d’écran 2020-10-20 à 08 09 51

@arefaslani
Copy link
Member

Have you been successful in solving this issue by now? Sorry, I just came back to check the issues. Seems like I need to change the regex to make it also compatible with the browsers you mentioned.

@GautheyValentin
Copy link
Author

Hi,

I just downgraded to 1.3.0 because it was an old regex and i didn't fixe this issue.

But maybe is my fault, what is your tsconfig ?

@arefaslani
Copy link
Member

Hi,

I just downgraded to 1.3.0 because it was an old regex and i didn't fixe this issue.

But maybe is my fault, what is your tsconfig ?

Actually, I don't work with Typescript, but I'll definitely try to see what's wrong...

@arefaslani
Copy link
Member

@GautheyValentin Have you been successful in solving this problem?

@GautheyValentin
Copy link
Author

GautheyValentin commented Jan 19, 2021

No :(

@message
Copy link

message commented Feb 17, 2021

Why this script is included in _app.js? It's a webpack script that should be executed in build phase only. You should require next-images from next.config.js.

@GautheyValentin
Copy link
Author

It is already only in next.config.js

const widthImages = require("next-images");
const { nextI18NextRewrites } = require("next-i18next/rewrites");

const localeSubpaths = {
  fr: "fr",
  nl: "nl",
};

module.exports = {
  default: widthImages({
    webpackDevMiddleware: (config) => {
      config.watchOptions = {
        aggregateTimeout: 200,
        poll: 1000,
      };
      return config;
    },
    rewrites: async () => nextI18NextRewrites(localeSubpaths),
  }),
  localeSubpaths,
  env: {
    NEXT_PUBLIC_RECAPTCHA_SITE_KEY: process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY,
  },
};

@alexthewilde
Copy link

Same here. next-images is required from within next.config.js, but its code is added to the app bundle.

@lvancraen
Copy link
Contributor

lvancraen commented Nov 1, 2021

When wrapping the regex /\.\w+(?<!(s?c|sa)ss)$/i with RegExp as such new RegExp('\.\w+(?<!(s?c|sa)ss)$', 'i') the error is resolved in Safari.

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

No branches or pull requests

5 participants