Skip to content

Webpack usage? #1

@mirryi

Description

@mirryi

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions