Closed dakur closed 1 year ago
It seems that you bundled the umd
or esm
version of code without transcoded.
This package provides es5 version code as the default option. And provides esm as an optimization option.
Did you use a packaging tool like webpack? And set resolve.mainFields to something likemodule
. If this is the case, you need to transcode by yourself.
Sorry for late response.
Yes, I use webpack, but there is no resolve.mainFields
set. Maybe some of these settings may affect it?
tsconfig.json
:
{
"compilerOptions": {
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"lib": [
"dom", "es6", "dom.iterable", "scripthost",
"es2016.array.include"
],
"noImplicitAny": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"jsx": "react",
"strict": true,
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"vendor"
]
}
.babelrc
:
{
"plugins": [
["@babel/plugin-transform-runtime", {
"useESModules": true
}]
],
"presets": [
["@babel/preset-env", {
"modules": false,
"useBuiltIns": "usage",
"corejs": 3
}]
]
}
fixed in d1d7e0163f3f60230860cbd872ab07fca3145f72
Thank you. We don't support EdgeHTML anymore, but maybe someone else will test it.
If I use
as stated in docs, I've got error
SCRIPT1028: SCRIPT1028: Expected identifier, string or number
in MS Edge 44 (EdgeHTML 18) pointing to lineOld Edge can not parse
...
thus this error. If I change import toimport {elementScrollIntoView} from 'seamless-scroll-polyfill/dist/es5/seamless.js';
instead it works, but types are gone, so I have to@ts-ignore
the import.Is there a solution to this or is it a bug?
Thanks.