Comments (7)
Workaround: add resolve.alias
to webpack config:
resolve: {
alias: {
"dictionary-en": path.resolve(__dirname, 'node_modules', "dictionary-en"),
"dictionary-fr": path.resolve(__dirname, 'node_modules', "dictionary-fr")
}
}
from dictionaries.
Please show your code
from dictionaries.
import * as nspellImport from 'nspell';
import enAff from 'dictionary-en/index.aff';
import enDic from 'dictionary-en/index.dic';
import frAff from 'dictionary-fr/index.aff';
import frDic from 'dictionary-fr/index.dic';
export const nspell = nspellImport;
export const dictionaries = [
{ aff: enAff, dic: enDic },
{ aff: frAff, dic: frDic }
];
It is entry for webpack. Produced file then used in browser to activate nspell and check words.
from dictionaries.
That is indeed not supported. Did you read the docs?
from dictionaries.
No. But that code works before you add exports field in package.json.
It works for many years and uses for spell checking.
from dictionaries.
I am not author of that code. But I support the product where it used.
from dictionaries.
But that code works before you add exports field in package.json.
There was a major version release.
Adding export maps is intentional. It hides private APIs and only expose public APIs.
This was not documented as working. And it doesn’t work in JS: it’s Webpack-specific.
There is a better documented public API that does work in JavaScript:
import en from 'dictionary-en'
import fr from 'dictionary-fr'
from dictionaries.
Related Issues (20)
- arabic HOT 2
- Origin of Russian dictionaries? HOT 2
- Add type definitions HOT 1
- Convert to ESM HOT 6
- Add words to German dictionary HOT 4
- en_GB doesn't work for "misspelt" HOT 1
- Suggestion is not working for Swedish HOT 1
- [update word] Polish "przypuszczać - przypuszczający" HOT 1
- Investigate shipping `.dic`, `.aff` as JSON HOT 3
- [Question] Is there some index accross dictionaries ? HOT 1
- Simple code is not running HOT 4
- Force accents in Russian dictionary (ё) HOT 2
- Lithuanian dictionary is wrong HOT 2
- Use a newer, updated source for Russian HOT 4
- Korean returns true for all words (correct function) HOT 1
- Issue in Dictionary file - Different style apostrophes, it marks it as a misspelling HOT 2
- Add Swahili dictionaries HOT 1
- There should be no Eszett in Swiss German HOT 1
- Html Entities found in `.aff` files. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dictionaries.