Bsb-native generates incorrect import/require statements

bsb

#1

I’m building a project that uses Reprocessing. The default example uses a custom require_polyfill, which works fine, but when I try to use webpack to bundle the JS code together I get a Module not Found: Error: can't resolve error. This is what the generated import code looks like:

"package-specs": ["commonjs"]

var Reprocessing_Env = require("Reprocessing//home/anton/code/game/crazy-rideshare/node_modules/reprocessing/lib/js/src/Reprocessing_Env.js");

None of the bundlers I tried have been able to recognize this format.

"package-specs": ["es6-global"]

import * as Reprocessing_Env from "../../../../../../../../node_modules/reprocessing/lib/home/anton/code/game/crazy-rideshare/node_modules/reprocessing/lib/es6_global/src/Reprocessing_Env.js";

This path is just plain wrong.

Is there a setting I’m missing that will generate correct import statements? This is the project repo.


#2

Hey thanks for reporting this issue. Are you using 4.0.6?
As far as I know this issue is fixed in the next version, 4.0.7000

EDIT: Just saw you were the one opening this issue https://github.com/Schmavery/reprocessing/issues/125