Open alex-ohadi opened 1 month ago
I noticed that in the newer version
"exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js", "require": "./dist/index.cjs" } },
./dist/index.cjs was removed
any workaround, for a really simple use case this has been a dead end.
@ndom91
@alex-ohadi did you find another options?
Yup, I just removed this feature entirely and got the timezone based on the browser. Alex OhadiOn Oct 30, 2024, at 7:19â¯AM, zthomas1 @.***> wrote: any workaround, for a really simple use case this has been a dead end.
âReply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
const [timezone] = useState( Intl.DateTimeFormat().resolvedOptions().timeZone)
You can get various abbreviations and offsets by tweaking this output const abbrev = new Intl.DateTimeFormat('en-US', options).formatToParts(date); const date = new Date(); const offset = date.getTimezoneOffset();
Describe the bug
Latest version that works react-timezone-select@2.1.5 works Breaking change starts here: react-timezone-select@3.2.0
Current Webpack version installed "webpack": "^5.95.0", "webpack-cli": "^5.1.4", "webpack-dev-server": "^5.1.0", "webpack-shell-plugin-next": "^2.3.2"
Module not found: Error: Package path . is not exported from package in/node_modules/react-timezone-select
Reproduction
yarn start
System Info
Used Package Manager
yarn
Validations