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

added SpellingDictionaryCollection to cspell-lib exports #1815

Conversation

wujekbogdan
Copy link
Contributor

I'm trying to use cspell-lib in our application (we're building a spell-checker service in node - more details here: #1813).

I need to use the SpellingDictionaryCollection class to be able to add custom dictionaries, but this class is not exported from cspell-lib. The only way to import it is:

import { SpellingDictionaryCollection } from 'cspell-lib/dist/SpellingDictionary';

But this isn't a good solution as it causes Webpack builds to fail because of non-static require() calls.

This PR adds SpellingDictionaryCollection to packages/cspell-lib/src/index.ts exports, thanks to this it can be imported this way:

import { SpellingDictionaryCollection } from 'cspell-lib';

@wujekbogdan wujekbogdan changed the title added SpellingDictionaryCollection to cspell-lib exports added SpellingDictionaryCollection to cspell-lib exports Sep 30, 2021
@Jason3S Jason3S merged commit fed554f into streetsidesoftware:main Sep 30, 2021
@wujekbogdan wujekbogdan deleted the feature/spelling_dictionary_collection_export branch September 30, 2021 15:53
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 this pull request may close these issues.

None yet

2 participants