Comments (11)
cc @long76
from scroll-into-view-if-needed.
cc @long76
Hi, try #1163 (comment)
Please get me reply
from scroll-into-view-if-needed.
cc @long76
Hi, try #1163 (comment)
Please get me reply
I noticed that, but I think type="module"
should be the correct fix, otherwise it's a BREAKING CHANGE!
from scroll-into-view-if-needed.
cc @long76
Hi, try #1163 (comment)
Please get me replyI noticed that, but I think
type="module"
should be the correct fix, otherwise it's a BREAKING CHANGE!
it's breaking change only for webpack users which not set config for response .mjs
my test app without webpack on TS work correctly. but i agree that the last change broke app on webpack where don't hardcoded version of this library.
for users i see a few variants:
- use hardcoded version(library not in active development and stable for are while)
- make branch
3.0.x
, revert my changes, release and release main branch as3.1.0
(too for https://github.com/scroll-into-view/compute-scroll-into-view) - just edit your
webpack.config.js
like here #1163 (comment)
from scroll-into-view-if-needed.
@Wxh16144 if you prefer second solution and do not want edit your app just discus this with @stipsan
from scroll-into-view-if-needed.
@Wxh16144 and fix for antd is ready ant-design/antd-tools#272
from scroll-into-view-if-needed.
check third solution on antd
work correctly
before fix in antd-tools
C:\ant-design>npm run dist
> [email protected] predist
> npm run version
> [email protected] version
> node ./scripts/generate-version
> [email protected] dist
> antd-tools run dist
Execute: dist - {}
- Args: {}
× 🚚 Ant Design Tools
Compiled with some errors in 2.99m
Webpack Bundle Analyzer saved report to C:\ant-design\report.html
(node:8160) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. (Triggered by calling processImmediate on process.)
at emitMakeCallbackDeprecation (node:domain:143:13)
at process.topLevelDomainCallback (node:domain:157:5)
at process.callbackTrampoline (node:internal/async_hooks:128:24)
* 🚚 Ant Design Tools █████████████████████████ after chunk asset optimization (93%) SourceMapDevToolPlugin
Error parsing bundle asset "C:\ant-design\dist\antd-with-locales.min.js": no such file
Error parsing bundle asset "C:\ant-design\dist\antd.min.js": no such file
No bundles were parsed. Analyzer will show only original module sizes from stats file.
Webpack Bundle Analyzer saved report to C:\ant-design\report.html
(undefined) ./node_modules/scroll-into-view-if-needed/dist/index.mjs 1:457-458
Can't import the named export 'compute' from non EcmaScript module (only default export is available)
at HarmonyImportSpecifierDependency._getErrors (C:\ant-design\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:88:6)
at HarmonyImportSpecifierDependency.getErrors (C:\ant-design\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:68:16)
at Compilation.reportDependencyErrorsAndWarnings (C:\ant-design\node_modules\webpack\lib\Compilation.js:1463:22)
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1258:10
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:31:1)
at AsyncSeriesHook.lazyCompileHook (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.finish (C:\ant-design\node_modules\webpack\lib\Compilation.js:1253:28)
at C:\ant-design\node_modules\webpack\lib\Compiler.js:672:17
at _done (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
at eval (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:32:22)
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1185:12
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1097:9
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
@ ./components/anchor/Anchor.tsx
@ ./components/anchor/index.ts
@ ./components/index.ts
@ ./index-with-locales.js
(undefined) ./node_modules/scroll-into-view-if-needed/dist/index.mjs 1:547-548
Can't import the named export 'compute' from non EcmaScript module (only default export is available)
at HarmonyImportSpecifierDependency._getErrors (C:\ant-design\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:88:6)
at HarmonyImportSpecifierDependency.getErrors (C:\ant-design\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:68:16)
at Compilation.reportDependencyErrorsAndWarnings (C:\ant-design\node_modules\webpack\lib\Compilation.js:1463:22)
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1258:10
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:31:1)
at AsyncSeriesHook.lazyCompileHook (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.finish (C:\ant-design\node_modules\webpack\lib\Compilation.js:1253:28)
at C:\ant-design\node_modules\webpack\lib\Compiler.js:672:17
at _done (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
at eval (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:32:22)
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1185:12
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1097:9
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
@ ./components/anchor/Anchor.tsx
@ ./components/anchor/index.ts
@ ./components/index.ts
@ ./index-with-locales.js
(undefined) ./node_modules/scroll-into-view-if-needed/dist/index.mjs 1:457-458
Can't import the named export 'compute' from non EcmaScript module (only default export is available)
at HarmonyImportSpecifierDependency._getErrors (C:\ant-design\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:88:6)
at HarmonyImportSpecifierDependency.getErrors (C:\ant-design\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:68:16)
at Compilation.reportDependencyErrorsAndWarnings (C:\ant-design\node_modules\webpack\lib\Compilation.js:1463:22)
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1258:10
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:20:1)
at AsyncSeriesHook.lazyCompileHook (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.finish (C:\ant-design\node_modules\webpack\lib\Compilation.js:1253:28)
at C:\ant-design\node_modules\webpack\lib\Compiler.js:672:17
at _done (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
at eval (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:32:22)
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1185:12
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1097:9
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
@ ./components/anchor/Anchor.tsx
@ ./components/anchor/index.ts
@ ./components/index.ts
@ ./index-with-locales.js
(undefined) ./node_modules/scroll-into-view-if-needed/dist/index.mjs 1:547-548
Can't import the named export 'compute' from non EcmaScript module (only default export is available)
at HarmonyImportSpecifierDependency._getErrors (C:\ant-design\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:88:6)
at HarmonyImportSpecifierDependency.getErrors (C:\ant-design\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:68:16)
at Compilation.reportDependencyErrorsAndWarnings (C:\ant-design\node_modules\webpack\lib\Compilation.js:1463:22)
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1258:10
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:20:1)
at AsyncSeriesHook.lazyCompileHook (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.finish (C:\ant-design\node_modules\webpack\lib\Compilation.js:1253:28)
at C:\ant-design\node_modules\webpack\lib\Compiler.js:672:17
at _done (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
at eval (eval at create (C:\ant-design\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:32:22)
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1185:12
at C:\ant-design\node_modules\webpack\lib\Compilation.js:1097:9
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
@ ./components/anchor/Anchor.tsx
@ ./components/anchor/index.ts
@ ./components/index.ts
@ ./index-with-locales.js
after fix
C:\ant-design>npm run dist
> [email protected] predist
> npm run version
> [email protected] version
> node ./scripts/generate-version
> [email protected] dist
> antd-tools run dist
Execute: dist - {}
- Args: {}
√ 🚚 Ant Design Tools
Compiled successfully in 2.93m
Webpack Bundle Analyzer saved report to C:\ant-design\report.html
(node:9492) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. (Triggered by calling processImmediate on process.)
at emitMakeCallbackDeprecation (node:domain:143:13)
at process.topLevelDomainCallback (node:domain:157:5)
at process.callbackTrampoline (node:internal/async_hooks:128:24)
√ 🚚 Ant Design Tools
Webpack Bundle Analyzer saved report to C:\ant-design\report.html
Child
Time: 287847ms
Built at: 09.04.2023 13:55:46
Asset Size Chunks Chunk Names
antd-with-locales.min.js 1.53 MiB 0 [emitted] [big] antd-with-locales.min
antd-with-locales.min.js.map 5.91 MiB 0 [emitted] [dev] antd-with-locales.min
antd.min.js 1.27 MiB 1 [emitted] [big] antd.min
antd.min.js.map 5.35 MiB 1 [emitted] [dev] antd.min
Entrypoint antd.min [big] = antd.min.js antd.min.js.map
Entrypoint antd-with-locales.min [big] = antd-with-locales.min.js antd-with-locales.min.js.map
Child
Time: 176006ms
Built at: 09.04.2023 13:53:56
Asset Size Chunks Chunk Names
antd-with-locales.js 8.36 MiB antd-with-locales [emitted] [big] antd-with-locales
antd-with-locales.js.map 7.58 MiB antd-with-locales [emitted] [dev] antd-with-locales
antd.js 7.76 MiB antd [emitted] [big] antd
antd.js.map 6.94 MiB antd [emitted] [dev] antd
Entrypoint antd [big] = antd.js antd.js.map
Entrypoint antd-with-locales [big] = antd-with-locales.js antd-with-locales.js.map
[Dist] Finalization...
from scroll-into-view-if-needed.
try find another solution
from scroll-into-view-if-needed.
@Wxh16144 @stipsan it's my mistake sorry for that, PR is ready:
compute-scroll-into-view scroll-into-view/compute-scroll-into-view#891
scroll-into-view-if-needed #1183
from scroll-into-view-if-needed.
@Wxh16144 fix released, version 3.0.9
from scroll-into-view-if-needed.
Respect~
from scroll-into-view-if-needed.
Related Issues (20)
- [BUG] Safari on macOS Monterey 12.3.1
- "Cannot use import statement outside a module" error when using v2.2.31 HOT 1
- Dealing with a Fixed Navbar HOT 2
- "export 'default' (imported as 'compute') was not found in 'compute-scroll-into-view' HOT 1
- t.scroll is not a function HOT 1
- [TS] typedoc TS1479 error HOT 8
- scrollIntoView does not work anymore for element in shadow dom
- scroll position error with `display: none;` element HOT 1
- Add an options to skip in document check or pass a new `document`
- Body behind the modal scrolls HOT 1
- Snaps instead of scrolling smoothly. HOT 2
- Unneeded scrolling of ancestors HOT 1
- how to know when scrolling is complete?
- Does not scroll to element in iframe outside viewport HOT 2
- How can I combine behavior function and behavior smooth
- Shadow DOM support? HOT 2
- Dependency Dashboard
- Scroll horizontally only inside a specific div HOT 1
- Horizontal RTL scrolling goes wrong way HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scroll-into-view-if-needed.