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

How can I use Babel to convert RRWeb to IE11 code? #1660

Open
wangding-2020 opened this issue Mar 3, 2025 · 0 comments
Open

How can I use Babel to convert RRWeb to IE11 code? #1660

wangding-2020 opened this issue Mar 3, 2025 · 0 comments

Comments

@wangding-2020
Copy link

How to use Babel to convert rrweb into code that supports IE11 environment?
The document states that rrweb does not support IE11 and below. IE11 is supported, but there is no specific explanation. I always encounter problems when using babel conversion here, and I cannot run it even after imitating some babel IE11 examples. Can you provide example code for converting babel to IE11 support in the official document
Here is my Babel configuration:

module.exports = api => {
api.cache(true)
return {
plugins: [
["@babel/plugin-proposal-decorators",{"decoratorsBeforeExport":true}],
],
presets: [
[
"@babel/preset-env",
{
modules: 'auto',
targets: {
ie: "11"
},

        useBuiltIns: "usage",
        corejs: 3
	}
    ]
]
}

}
package.json:
"dependencies": {
"core-js": "^3.41.0"
},
"devDependencies": {
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.6",
"@babel/plugin-proposal-decorators": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.12.17",
"@babel/preset-env": "^7.12.17",
"@babel/runtime": "^7.14.6",
"babel-loader": "^8.2.2",
"css-loader": "^5.0.2",
"html-loader": "^2.1.0",
"html-webpack-plugin": "^5.2.0",
"sass": "^1.32.8",
"style-loader": "^2.0.0",
"webpack": "^5.39.1",
"webpack-cli": "^4.7.2",
"webpack-dev-server": "^5.2.0"
},
"scripts": {
"build": "babel src/rrweb.umd.js"
}

Run command:npm run build -- -d dist

The above is just one of my configurations. I have tried it multiple times, and the best one was that there were no syntax errors. IE11 runs normally, but when I start recording, it will prompt that the proxy is undefined or something like that. Please forgive me for not being very good at this aspect. Thank you! Thank you

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

1 participant