Skip to content
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

1.2.4 breaks webpack compilation #16

Closed
neonerd opened this issue Nov 15, 2017 · 9 comments · Fixed by #19
Closed

1.2.4 breaks webpack compilation #16

neonerd opened this issue Nov 15, 2017 · 9 comments · Fixed by #19

Comments

@neonerd
Copy link
Contributor

neonerd commented Nov 15, 2017

Module '"D:/xxx/node_modules/slugify/index"' resolves to a non-module entity and cannot be imported using this construct.
@neonerd
Copy link
Contributor Author

neonerd commented Nov 15, 2017

Can be fixed by turning

import * as slugify from "slugify"

to

import  slugify from "slugify"

But this is still a breaking change for people using ES6 import notation and should've therefore been projected in the semver as 2.0.0.

@simov
Copy link
Owner

simov commented Nov 15, 2017

How can I reproduce this issue? The only thing added in 1.2.4 is the index.d.ts file.

@neonerd
Copy link
Contributor Author

neonerd commented Nov 15, 2017

I'm not sure whether it was 1.2.4 or something before, the last working version was 1.2.1 for me.

I'll try to attach a reproducable setup tomorrow. :)

zucher added a commit to ALE-Rainbow/ReDoc that referenced this issue Nov 21, 2017
@zucher
Copy link

zucher commented Nov 21, 2017

The Project https://github.com/Rebilly/ReDoc get the same error during "npm run build-dist"

@simov
Copy link
Owner

simov commented Nov 22, 2017

Like I said earlier the only thing changed was the TypeScript definition: https://github.com/simov/slugify/blob/master/index.d.ts
Can you spot any issues with that file?

@jestho
Copy link

jestho commented Nov 24, 2017

My guess would be that export = slugify should probably be export default slugify. That or export declare function slugify(…)

@simov
Copy link
Owner

simov commented Nov 24, 2017

Thanks @jestho! However I'm not that familiar with TypeScript. If anyone can test and see which one of the suggested syntax changes fixes the issue I'll add/merge it.

@neonerd
Copy link
Contributor Author

neonerd commented Nov 24, 2017

You have a pull request fixing this, tested with newest Webpack / TS-Loader example.

Works both with

import slugify from "slugify"

and

import * as slugify from "slugify"

now.

@simov
Copy link
Owner

simov commented Nov 24, 2017

Everyone, the TypeScript definition was fixed in v1.2.6 ! 🎉 ✨

Thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants