diff --git a/.eslintignore b/.eslintignore index 12017a94b4fa3ac..02dd2b05059b4c9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,5 +3,4 @@ node_modules **/_next/** **/dist/** examples/with-ioc/** -examples/with-kea/** -test/integration/production/public/**/* \ No newline at end of file +examples/with-kea/** \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 45b15e04b5f79dc..3701997c2bbfccc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,4 @@ node_modules **/.next/** **/_next/** -**/dist/** -test/integration/production/public/**/* \ No newline at end of file +**/dist/** \ No newline at end of file diff --git a/.prettierignore_staged b/.prettierignore_staged index 9bb6a6d7011975d..7278db6b0605e4a 100644 --- a/.prettierignore_staged +++ b/.prettierignore_staged @@ -1,4 +1,3 @@ **/.next/** **/_next/** -**/dist/** -test/integration/production/public/**/* \ No newline at end of file +**/dist/** \ No newline at end of file diff --git a/test/integration/production/pages/regexp-polyfill.js b/test/integration/production/pages/regexp-polyfill.js index da7fbe2910ec1b0..72d7af39b1d106a 100644 --- a/test/integration/production/pages/regexp-polyfill.js +++ b/test/integration/production/pages/regexp-polyfill.js @@ -1,12 +1,23 @@ -export default () => { +import * as React from 'react' + +const Home = () => { if (typeof window !== 'undefined') { window.didRender = true } + React.useEffect(() => { + // If this script is loaded before the polyfills it will + // still fail + const el = document.createElement('script') + el.src = '/regexp-test.js' + document.querySelector('body').appendChild(el) + }, []) + return ( <>
hi
- > ) } + +export default Home diff --git a/test/integration/production/public/regexp-test.js b/test/integration/production/public/regexp-test.js index f3daf17b45598f5..5aed3df57a9aea8 100644 --- a/test/integration/production/public/regexp-test.js +++ b/test/integration/production/public/regexp-test.js @@ -1,13 +1,12 @@ -window.hubspot=window.hubspot||{};window.hubspot.formsnext=window.hubspot.formsnext||{};window.hubspot.formsnext.version="FormsNext-static-3.465";"undefined"==typeof window.hbspt&&(window.hbspt={});"undefined"==typeof window.hbspt.forms&&(window.hbspt.forms={});"undefined"==typeof window.hbspt.forms.deps&&(window.hbspt.forms.deps={});window.__hsRoot={globals:["reqwest","React","ReactDOM","I18n","Pikaday","Promise","require","requirejs","define","exports","module","bootstrap"],saveGlobal:function(e){"undefined"==typeof window.hspreserve&&(window.hspreserve={});if("undefined"!=typeof window[e]){window.hspreserve[e]=window[e];window[e]=void 0}},restoreGlobal:function(e){window.hbspt.forms.deps[e]=window[e];window[e]=window.hspreserve[e]}};!function(){for(var e=0;e