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

Webpack usage? #1

Open
mirryi opened this issue Apr 30, 2020 · 0 comments
Open

Webpack usage? #1

mirryi opened this issue Apr 30, 2020 · 0 comments

Comments

@mirryi
Copy link

mirryi commented Apr 30, 2020

Is it possible to bundle wordpos and the WordNet data files with Webpack? I've tried the following configuration, but it fails to resolve the index files when run.

webpack.config.js:

resolve: {
  alias: {
    "wordpos-web": path.resolve(__dirname, "node_modules/wordpos-web/dist/wordpos.min.js")
  }
}

WordPOS construction:

import WordPOS from "wordpos-web"

let wordpos = new WordPOS({
  dictPath: "../../../node_modules/wordpos-web/dict", // also tried "../dict"
});

I tried importing the index files so they would be bundled:

import "../../../node_modules/wordpos-web/dict/index.adv.js"
import "../../../node_modules/wordpos-web/dict/index.noun.js"
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

No branches or pull requests

1 participant