Coder Social home page Coder Social logo

Comments (11)

Wxh16144 avatar Wxh16144 commented on July 24, 2024

cc @long76

from scroll-into-view-if-needed.

long76 avatar long76 commented on July 24, 2024

cc @long76

Hi, try #1163 (comment)

Please get me reply

from scroll-into-view-if-needed.

Wxh16144 avatar Wxh16144 commented on July 24, 2024

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.

long76 avatar long76 commented on July 24, 2024

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!

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:

from scroll-into-view-if-needed.

long76 avatar long76 commented on July 24, 2024

@Wxh16144 if you prefer second solution and do not want edit your app just discus this with @stipsan

from scroll-into-view-if-needed.

long76 avatar long76 commented on July 24, 2024

@Wxh16144 and fix for antd is ready ant-design/antd-tools#272

from scroll-into-view-if-needed.

long76 avatar long76 commented on July 24, 2024

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.

long76 avatar long76 commented on July 24, 2024

try find another solution

from scroll-into-view-if-needed.

long76 avatar long76 commented on July 24, 2024

@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.

long76 avatar long76 commented on July 24, 2024

@Wxh16144 fix released, version 3.0.9

from scroll-into-view-if-needed.

Wxh16144 avatar Wxh16144 commented on July 24, 2024

Respect~

from scroll-into-view-if-needed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.