Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

react-bootstrap-table2-toolkit Import Error in Webpack 5 #1520

Open
Assignees
@enosisbd-anonta

Description

Describe the Bug
react-bootstrap-table2-toolkit package causes error when bundled using webpack 5 (5.3.2 to be exact). Simply adding import { Search } from 'react-bootstrap-table2-toolkit'; to any js file produces the following error.

SearchBar.js:9 Uncaught ReferenceError: arguments is not defined
 at eval (SearchBar.js:9)
 at Object../node_modules/react-bootstrap-table2-toolkit/lib/src/search/SearchBar.js (bundle.js:459)
 at __webpack_require__ (bundle.js:1141)
 at fn (bundle.js:1335)
 at eval (index.js:7)
 at Object../node_modules/react-bootstrap-table2-toolkit/lib/src/search/index.js (bundle.js:507)
 at __webpack_require__ (bundle.js:1141)
 at fn (bundle.js:1335)
 at eval (index.js:8)
 at Object../node_modules/react-bootstrap-table2-toolkit/lib/index.js (bundle.js:313)

The package works fine when bundled using webpack 4.

To Reproduce
Steps to reproduce the behavior:

  1. Clone this sample repository. It's a minimal react project that uses webpack 5.
  2. Checkout master branch
  3. Start the app using npm start and look for the error in console.
  4. Changes made in this commit are causing the error

Screenshots
The app fails to start because it gets an error while importing from react-bootstrap-table2-toolkit package.
error-screenshot

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /