Skip to content

Commit 5954195

Browse files
authored
HACK: Make parceljs ignore the webpack-only require
The `if` surrounding the require of `!raw-loader!./js.py` should be enough to limit the processing of this line only by webpack. However, looks like parceljs is greedy and tries to follow such path. Then it fails for a code path that will never be executed by him. The code change make parceljs ignore such require. Is not beautiful and should be replaced when parceljs provides something nicer.
1 parent 8eadb53 commit 5954195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (typeof webpackJsonp !== 'object') {
2121
pyjs = require('fs').readFileSync(__dirname + '/js.py').toString();
2222
}
2323
else {
24-
pyjs = require('!raw-loader!./js.py').default;
24+
pyjs = require('!raw-loader!' + './js.py').default;
2525
}
2626

2727
function wait_exist(fn) {

0 commit comments

Comments
 (0)