UNPKG

@mrizki/natural

Version:

General natural language (tokenizing, stemming (English, Russian, Spanish), part-of-speech tagging, sentiment analysis, classification, inflection, phonetics, tfidf, WordNet, jaro-winkler, Levenshtein distance, Dice's Coefficient) facilities for node.

52 lines (38 loc) 1.31 kB
var webpack = require('webpack'); var path = require('path'); module.exports = { mode: "none", target: "web", resolve: { extensions: ['.js', '.json'], modules: ['node_modules', '.'], // Use our versions of Node modules. alias: { 'fs': 'browserfs/dist/shims/fs.js', 'buffer': 'browserfs/dist/shims/buffer.js', 'path': 'browserfs/dist/shims/path.js', 'processGlobal': 'browserfs/dist/shims/process.js', 'bufferGlobal': 'browserfs/dist/shims/bufferGlobal.js', 'bfsGlobal': require.resolve('browserfs') } }, // REQUIRED to avoid issue "Uncaught TypeError: BrowserFS.BFSRequire is not a function" // See: https://github.com/jvilk/BrowserFS/issues/201 module: { noParse: /browserfs\.js/ }, watch: false, output: {filename: 'spec.js'}, plugins: [ // Expose BrowserFS, process, and Buffer globals. // NOTE: If you intend to use BrowserFS in a script tag, you do not need // to expose a BrowserFS global. new webpack.ProvidePlugin({ BrowserFS: 'bfsGlobal', process: 'processGlobal', Buffer: 'bufferGlobal' }) ], // DISABLE Webpack's built-in process and Buffer polyfills! node: { process: false, Buffer: false, }, stats: "normal" };