Open lenin-anzen opened 7 years ago
@lenin-anzen Looks like the bundle you're trying to debundle stores it's modules in an unfamiliar place. Using a tool like http://astexplorer.net/, you should be able to figure out where they are located, and specify the path in the configuration file with the property moduleAst.
In addition, I suspect that your entryPoint
is wrong, the bundle contains this code which makes me thing that your entrypoint is actually module 0:
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
I found that the one that makes the package is the following project:
With the next notes:
The model.xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<feature>
<name>ext-bb-login-ng</name>
<contextItemName>[BBHOST]</contextItemName>
<properties>
<property name="version" label="Version" readonly="true" viewHint="text-input,admin,designModeOnly">
<value type="string">1.0.30</value>
</property>
<property name="title" label="Title" readonly="true" viewHint="admin,designModeOnly">
<value type="string">ext-bb-login-ng</value>
</property>
<property name="path" label="Path" readonly="true" viewHint="designModeOnly">
<value type="string">$(itemRoot)/scripts/ext-bb-login-ng.js</value>
</property>
<property name="feature.ui-bb-i18n-ng" label="Feature Ui Bb I 18 N Ng" readonly="true" viewHint="">
<value type="string">ui-bb-i18n-ng</value>
</property>
<property name="feature.vendor-bb-angular-ng-aria" label="Feature Vendor Bb Angular Ng Aria" readonly="true" viewHint="">
<value type="string">vendor-bb-angular-ng-aria</value>
</property>
</properties>
</feature>
</catalog>
I am having the same issue. Could you please explain where in the astexplorer one finds the AST of a bundle.js file? Not very familiar with the whole AST thing...
Also, wondered if someone knows how to find the correct entrypoint for a webpack bundle??
@willvlad make sure your bundle file only have webpack code, the amd
、umd
mode config need remove. exp: https://github.com/1egoman/debundle/blob/master/test_bundles/webpack/bundle.js
webpack entrypoint is 0
@1egoman
In order to troubleshoot, I need:
A bundle that doesn't work, preferably as minimal as possible. Upload it to pastebin.com:
Link: https://pastebin.com/eg22rLqE
Any commands you ran prior to debundling:
Your configuration that you passed with the
-c
argument when debundling.The EXACT command you ran to debundle.
node ./node_modules/debundle/src/index.js -i ext-bundle.js -o ext-dist/ -c debundle.config.json
Tell me what the issue is:
If you omit any of these parts, I can't help you!