-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module has no has no default export with ts and rollup #277
Comments
any updates on this? |
Try |
## [1.10.1](v1.10.0...v1.10.1) (2018-09-15) ### Bug Fixes * **typings:** default export issue[iamkun#277](https://github.com/prantlf/dayjs/issues/277) ([149d477](149d477)) * Do not clone the Date instance needlessly in toISOString ([088cdc5](088cdc5))
@Kikisek I did like what you mentioned... like this:
I am hitting this error now:
|
@aibrahim3546 to be sure, do you have quotes around the second
|
@waitingsong @iamkun I re-did the Typescript definition in #466 which should fix the problem of default import. The current |
Updates: From v1.8.1 we could simply use |
Looks like this was reverted again here #476, so it's broken again as of 1.8.4 for rollup and things that use rollup, ng-packagr etc |
Even with @Kikisek workaround, I'm getting: version: 1.8.28 |
Also getting this version: 1.8.35 |
For those who are experiencing the
|
1.10.7, error still happened Have tried the workaround but still not working
|
Came across the Had success with: import dayjs from 'dayjs/esm'; |
It even worked for me with // rollup.config.js
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';
export default {
input: './src/main.ts',
output: {
file: './build/main.js',
format: 'cjs',
},
plugins: [
resolve({
exportConditions: ['node'],
}),
commonjs(),
typescript(),
],
}; |
compile with rollup , got error `Module
The text was updated successfully, but these errors were encountered: