some code didnot transform to es5 ....
We are having the same issue. The error reads:
Object doesn't support property or method 'repeat'
The app works in IE11, but when adding swr it crashes. Tried various polyfills without any luck.

String.prototype.repeat is part of ES6/ES2015; you would have to add an appropriate polyfill for browsers which don't support ES6.
I have tried to add that polypill multiple times, without any luck.
It's added at the top of the index.js and copied directly from the Mozilla code.

IE11 still gives the same error, and I have verified that the polyfill is being executed.

{
test: /\.(js|tsx|ts)?$/,
include: [path.join(process.cwd(), 'node_modules/swr')],
loaders: [{
loader: 'babel-loader'
}]
}
i use babel to transform it. and it work in ie11.
Hi !
Did it works for you ?
I don't have same error. I'm using swr with Next.js.
Thanks for help
@beidan I've tried your webpack config, it fail also

@joris-
Have a look at https://www.npmjs.com/package/next-transpile-modules if you are using Next.js. This helps transpile untranspiled modules in node_modules.
In your next.config.js
const withTM = require("next-transpile-modules")([
"swr"
]);
module.exports = withTM();
@joris-
Have a look at https://www.npmjs.com/package/next-transpile-modules if you are using Next.js. This helps transpile untranspiled modules innode_modules.In your next.config.js
const withTM = require("next-transpile-modules")([ "swr" ]); module.exports = withTM();
Thx I'll try
@beidan @joris-
This one works for me:
{
test: /\.(js|jsx)?$/,
exclude: /node_modules\/(?!swr)/,
use: {
loader: 'babel-loader',
},
},
A fix is released in v0.2.3 :tada:
Most helpful comment
A fix is released in v0.2.3 :tada: