rt2zz / redux-persist

persist and rehydrate a redux store
MIT License
12.91k stars 862 forks source link

redux-persist/constants not found #907

Open carloquilala opened 5 years ago

carloquilala commented 5 years ago

Can't resolve 'redux-persist/constants' in 'projects/proto12/node_modules/redux-persist-crosstab'

currently using these dependencies ` { "dependencies": { "react": "^16.4.2", "react-dom": "^16.4.2", "react-redux": "^5.0.4", "react-router": "^3.0.0", "redux": "^3.6.0", "redux-persist": "^5.10.0", "redux-persist-crosstab": "^3.7.0", "redux-thunk": "^2.2.0", } }

`

Aequitas737 commented 4 years ago

Looks like you can just reference the constants from the main import according to https://github.com/rt2zz/redux-persist/pull/554/files

So just replace import { xxx } from 'redux-persist/constants'; with import { xxx } from 'redux-persist';

Audiopolis commented 2 months ago

Example vite config:

{
    resolve: {
        alias: {
            "redux-persist/constants": "redux-persist",
        }
    }
}

Obviously not ideal.