Giter Club home page Giter Club logo

Comments (3)

okikio avatar okikio commented on May 25, 2024 1

I'll look into way to fix that behavior so it still bundles

from bundlejs.

okikio avatar okikio commented on May 25, 2024

This is an issue with the package.json of @reduxjs/toolkit

https://unpkg.com/@reduxjs/[email protected]/query/react/package.json

{
    "name": "@reduxjs/toolkit-query-react",
    "version": "1.0.0",
    "description": "",
    "main": "../../dist/query/react/index.js",
    "module": "../../dist/query/react/rtk-query-react.esm.js",
    "unpkg": "../../dist/query/react/rtk-query-react.umd.min.js",
    "author": "Mark Erikson <[email protected]>",
    "license": "MIT",
    "types": "../../dist/query/react/index.d.ts",
    "sideEffects": false
}

The version mismatch confuses bundlejs, I'm thinking about what the best solution for this would be? 🤔

from bundlejs.

markerikson avatar markerikson commented on May 25, 2024

Hmm. Yeah, part of the problem here is that this is actually all one package, with multiple entry points. That package.json file only exists so that alternate entry points work with Node's existing resolution algorithm.

The version numbers in those are pretty irrelevant, but technically I could update those as part of the build process, I guess.

RTK 2.0 has proper ESM and package.exports support, so that should improve things.

But, both these attempts error in different ways:

export { configureStore } from "@reduxjs/[email protected]";
export {createApi} from "@reduxjs/[email protected]/query/react";
// or
// export {createApi} from "@reduxjs/toolkit/query/[email protected]";
export { Provider } from "react-redux";

from bundlejs.

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.