mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
use simplified logic
This commit is contained in:
parent
99ca230bdb
commit
f5075eb3be
@ -51,7 +51,7 @@ fn project() -> Project {
|
||||
const fs = require('fs');
|
||||
|
||||
let nodeModules = {};
|
||||
|
||||
|
||||
// Webpack bundles the modules from node_modules.
|
||||
// For node target, we will not have `fs` module
|
||||
// inside the `node_modules` folder.
|
||||
@ -59,7 +59,7 @@ fn project() -> Project {
|
||||
// and give that to externals and webpack ignores
|
||||
// to bundle the modules listed as external.
|
||||
fs.readdirSync('node_modules')
|
||||
.filter(module => ['.bin'].indexOf(module) === -1)
|
||||
.filter(module => module !== '.bin')
|
||||
.forEach(mod => {
|
||||
// External however,expects browser environment.
|
||||
// To make it work in `node` target we
|
||||
|
Loading…
x
Reference in New Issue
Block a user