Questions tagged [polyfills]
Downloadable code used to add new functionality to browsers.
819
questions
0
votes
1
answer
19
views
Can angular polyfills.ts file be safely removed
Now that angular is working with Ivy and decided to abandon internet explorer.
Shall we safely remove the polyfills.ts file in our Angular >= v13 project?
0
votes
0
answers
15
views
How do I polyfill the "process" Node module in the Vite dev server?
In my Vite project, I am depending on a module that makes use of the process Node global in one of its functions. I don't call this function from my code, but the Vite dev server still gives me this ...
0
votes
0
answers
35
views
nuxt application is not working in internet explorer
I have the nuxt application which works fine in chrome and all other browser but it is getting failed in the internet explorer.
I tried so many solutions on the internet but had no luck yet so asking ...
0
votes
0
answers
118
views
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default... Polyfill
So I am creating an Instagram clone using React.js and Firebase, and ran into an issue while working on the file upload portion of the app. The error read:
"BREAKING CHANGE: webpack < 5 used ...
0
votes
0
answers
11
views
Should I still be using web-animations-js with my ionic App on v6
I'm using the @ionic/angular with the v6.. & saw I still had some polyfills.
Shall I safely remove the import 'web-animations-js' declaration & it's package.json import ?
0
votes
1
answer
339
views
Error: module not found in React, cannot resolve 'url' in ...axios/lib/adapters
I'm getting this error and am not sure firstly why it appears and secondly how to resolve.
the error message:
Compiled with problems:X
ERROR in ./node_modules/axios/lib/adapters/xhr.js 17:10-24
...
0
votes
0
answers
25
views
Webpack, babel, corejs - generate unnecessary code
I would need to explain how to set up babel in combination with a webpack for transpiling and polyfilling JS. I also need to target the IE 11 browser.
Browserlist settings
"browserslist": [
...
0
votes
0
answers
21
views
Electron-preload for node methods
I am working on converting my Electron project to use Electron v16 which uses contextBridge for the Node built-in modules.
I currently have this, which uses the net module:
import { Socket } from 'net'...
0
votes
2
answers
59
views
useState polyfill, is this correct?
Trying to write a custom implementation of useState. Let's say only for a single value.
function useMyState(initVal){
const obj = {
value: initVal,
get stateValGet() {
return this....
0
votes
0
answers
133
views
Polyfill issues in Vue project using Babel and Webpack
I am struggling to find a solution to this problem. I installed the ccxt library via npm but when I include it in the Vue project via the var ccxt = require ("ccxt") statement the following ...
2
votes
0
answers
29
views
true call polyfil(without spread/rest operators); bonus: apply & bind polyfills
I've been practicing call, apply, bind polyfills and suddenly realized that it's not really a polyfill if I use spread/rest operators, can't figure out how to pass arguments in call without it, any ...
0
votes
2
answers
345
views
Property 'randomUUID' does not exist on type 'Crypto'
I was trying to use crypto.randomUUID in my angular app v13.1, but it seems not to be available. Gives us this error if you try:
TS2339: Property 'randomUUID' does not exist on type 'Crypto'
It ...
1
vote
1
answer
197
views
Enable Angular 13: SSR error with Webpack
I updated the code base to Angular 13 and tried to implement SSR in it for SEO reason.
I followed the official documentation and there has been some changes made to the code by the CLI tool.
Now when ...
0
votes
0
answers
12
views
How to fix issue on IE when creating React JS pages
I tried to create react application without having nodejs and package manager. It’s running fine on google and edge (edge mode) but having an issue on IE.
I tried to add polyfills via cdn but as with ...
0
votes
0
answers
19
views
Ionic Capacitor Error occurs sporadically in app with polyfills
I am using Ionic 5 with Capacitor 2.4. Sometimes there are errors at runtime like this when running on android or apple devices:
"@capacitor://localhost/3.008c706ad59f318aa3fd.js:1:3212\...
2
votes
0
answers
174
views
Polyfill error "Syntax error in regular expression" in Angular application for Internet Explorer 11
My angular application (version 11) is not running in Internet Explorer 11.
I get the error Syntax error in regular expression in the polyfills-es5.js file.
polyfill error in browser console
error in ...
0
votes
0
answers
35
views
Next.js working with polyfills and jQuery package
Having an issue that specifically involves the Next.js array-flat polyfill. I need compatibility with older versions of Chrome, in this instance (v60-68). The application I'm working on uses a video ...
0
votes
1
answer
60
views
IE11 polyfills don't work for React app. Why?
In IE11 I get these errors:
But i have react-app-polyfill installed and imported in index.js first line:
0
votes
0
answers
143
views
AbortController polyfill
Tried to make a polyfill for the abortController, but I ran into this error: error image
Error: Failed to execute 'fetch' on 'Window': Failed to read the 'signal' property from 'RequestInit': Failed ...
1
vote
0
answers
405
views
Make Angular 12 app run on really old browser
this is my version of Angular:
Angular CLI: 12.2.6
Node: 16.13.2 (Unsupported)
Package Manager: npm 8.1.2
OS: win32 x64
Angular: 12.2.6
... animations, cdk, cli, common, compiler, compiler-cli, core
....
1
vote
0
answers
99
views
node-polyfill-webpack-plugin not recognizing in webpack.config.js
I am trying to use knex for sqlite local storage in an electron application and have gotten the “Breaking Change” message due to knex uses some of the polyfll components that seize to exist on webpack ...
0
votes
0
answers
60
views
How to test a Polyfills in JEST using react-testing-library?
describe("Test for polyfills", () => {
it("check for padStart", () => {
expect("abc".padStart(8, "0")).toEqual("00000abc");
});
}...
1
vote
1
answer
91
views
Polyfill for bind includes using call or apply, why?
The polyfill of bind which I find online is something like -
Function.prototype.bind = function(obj, ...args) {
const self = this;
return function(...args2) {
return self.apply(obj, [...args, ....
1
vote
0
answers
58
views
Problem with polyfill window.atob implementation inJavascript
I'm trying to write my own solution for a BFE problem https://bigfrontend.dev/problem/implement-atob
Basically, writing a polyfill for the atob function available in javascript
I tried to understand ...
1
vote
1
answer
144
views
Can the polyfill.ts file be deleted?
I have this polyfill.ts file in my app that have these import statements:
import 'zone.js/dist/zone';
import 'core.js';
import 'core-js/modules/es6.map';
import 'regenerator-runtime/runtime';
import '...
1
vote
0
answers
42
views
Is there an actual fix of background-attachment: fixed on mobile devices?
Is there an actual fix of background-attachment: fixed on mobile devices?
When you design your site background like this:
section {
background: cover fixed no-repeat;
}
.section-1 {
background-...
-1
votes
1
answer
160
views
Web component developed using stencil not working in IE11
I have some stencil components developed, but after production build the dist js included in plain HTML and using the component as
<my-comp></my-comp>
is not working there, getting error ...
0
votes
0
answers
17
views
Make polyfills optional when creating js library with webpack and babel
I'm writing a javascript library that will be included on an html page with a script tag. I'd like to support older browsers so I have polyfills as needed. Unfortunately, that adds about 75K to the ...
0
votes
0
answers
201
views
Angular ERROR in polyfills-es5.js from Terser
While trying to upgrade from angular 8 to 9, I get following error when trying to run ng build --prod.
Error in detail:
ERROR in polyfills-es5.js from Terser
Invalid assignment [polyfills-es5.js:1,17]
...
0
votes
0
answers
29
views
How to remove and reload external script tag functionality javascript
I am running this code at some point of my site:
function test(){
var script = document.createElement("script");
script.src = "https://my_script.js";
script.type="text/...
10
votes
4
answers
11k
views
Webpack 5 Errors - Cannot Resolve 'crypto', 'http', and 'https' in ReactJS Project
Background
I have created a new React project using npx create-react-app client and have encountered some issues with Webpack 5. Originally, I had errors with assert, os, and stream, but have fixed ...
0
votes
1
answer
206
views
Smooth scroll polyfill not working inside a forEach loop
I'm using the smooth scroll polyfill npm package https://github.com/iamdustan/smoothscroll on a website I'm developing and despite trying for hours, I can't get it working. After importing and ...
1
vote
0
answers
86
views
How to get polyfill core node modules working on Webpack with Electron Forge
I'm trying to get the core node module polyfill working with my electron-forge project which uses Webpack 5.
I'm using an npm package which utilises a few of the core node modules, so Webpack is ...
1
vote
3
answers
129
views
How to polyfill performance.now in Rust WebAssembly
I am trying to use the jwt_simple library in a cloudflare workers webassembly runtime. Following the basic example in the linked documentation, everything works fine up until key.authenticate(claims)? ...
0
votes
0
answers
34
views
bad request error with my NodeJs backend server for the request which manage the files upload
All two weeks I struggle for an issue that some geeks may found very basic.
I have a MEAN app. All the requests coming from the frontend work fine without one.
It is the post request with manage the ...
0
votes
1
answer
110
views
Blazor iframe not working with Internet Explorer 11
I am currently working on a Blazor ASP.NET CORE 3.1 application that needs to work on IE11. I am trying to view a PDF from the PDF binary. I have added tried adding blazor.polyfill.js and blazor....
1
vote
3
answers
58
views
Where is low level code of Javascript standard built-in objects?
I'm looking for the way to get low level code of javascript built-in function.
For example, there is an polyfill(I want like this form and I call this low level code in my way) in mdn site of 'Array....
1
vote
0
answers
58
views
rollup-plugin-polyfills-loader output gives error
I have the following rollup.config.js (I've only pasted in the relevant information for this issue):
import html from '@web/rollup-plugin-html';
import polyfillsLoader from '@web/rollup-plugin-...
0
votes
0
answers
49
views
vuejs 3 having troubles making pollyfill work on chrome
Hey' I am fairly new to polyfills and vuejs and I have created a project using vuejs 3 in the vue/cli
I need my project to run on chrome >50 and this is the browserslist
and_chr 96
chrome 96
...
3
votes
1
answer
291
views
after rollup build: regeneratorRuntime is not defined
I have the following rollup.config.js:
// Import rollup plugins
import html from '@web/rollup-plugin-html';
import polyfillsLoader from '@web/rollup-plugin-polyfills-loader';
import {copy} from '@web/...
0
votes
1
answer
616
views
Angular polyfill.ts file help. Where does the polyfill code go? and what is required to handle it?
So I have an angular project that is erroring out and in need of some 'polyfilling' as it were. Since Angular does not allow editing of the webpack.config.js file without exporting it I figured the ...
0
votes
0
answers
104
views
core-js is not polyfilling javascript code
I know babel can do polyfills using core-js behind the scenes. Still, I'm trying to understand how core-js works just by using it without babel (but bundling the js with webpack).
I installed core-js ...
0
votes
1
answer
69
views
React-hook-form and polyfill.io causing page to crash Z.current.unMount is not iterable
React-hook-form and polyfill.io causing page to crash Z.current.unMount is not iterable.
To re-create:
On IE11 you can go to polyfill.io and download the minified code. Or simply paste this into IE11 ...
0
votes
0
answers
70
views
React TypeError: Can't redefine non-configurable property 'error' in Internet Explorer 11
I'm having an issue in Internet Explorer while applying polyfills in react app which was created using CRA. After request to an api endpoint, a javascript error TypeError: Can't redefine non-...
0
votes
1
answer
19
views
how fix the y-axis's rate in plot
I am using a line to estimate the slope of my graphs. the data points are in the same size. But look at these two pictures. the first one seems to have a larger slope but its not true. the second one ...
0
votes
1
answer
847
views
Smooth scrolling polypill not working in NextJS
I'm using https://github.com/iamdustan/smoothscroll package to enable smooth scrolling in Safari.
I followed the doc and NextJS doc and created a custom app, in which I imported the polyfill import:
...
0
votes
1
answer
62
views
Angular 12 with ldapjs polyfill errors
I'm currently trying to build an Angular 12 application that supports login with LDAP credentials and is able to retrieve a custom ldap field. For LDAP access, tried to use ldapts (https://github.com/...
1
vote
1
answer
159
views
My react app not running in IE11 after migrated Webpack from v4 to v5
I changed the configuration of my app following the webpack documentation: https://webpack.js.org/migrate/5/.
After this, the app runs successfully on chrome and edge, but not working in IE11.
I have ...
0
votes
0
answers
58
views
how to remove Angular version from polyfills.js
I am using Angular 11 version and if i am fetching the response of polyfills.js there i can see the angular version.Any way by which the pollyfills.js file became unreadable or any way to hide the ...
0
votes
0
answers
772
views
Angular 12 and IE 11 production build error. TypeError: Object doesn't support this action
I know IE11 support is deprecated, but it is what the client and contract requires. I am able to get the site to run locally in Internet Explorer 11, but when I do the production build I get an error....