Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed leading '../' from path when unpacking #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pen42jzk
Copy link

The 'WEBPACK_ORIGIN_OFFSET' field wasn't working for me, so I changed it to just remove all '../' paths when unpacking.

Copy link
Owner

@pavloko pavloko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! I'm all in on this change if we could cleanup the var and proper module names. I've also just published a new version with some changes, so if you could pull the latest version and then make clean changes - I would really appreciate it.

console.log(chalk_1.default.green("Unpacking \uD83D\uDECD your source\u00A0maps \uD83D\uDDFA"));
var sources = consumer.sources;
sources.forEach(function (source) {
console.log(chalk_1.default.green(source));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be chalk.green(source)?

const filePath = `${process.cwd()}/${projectNameInput}/${source.substring(WEBPACK_SUBSTRING_INDEX)}`
var sanitizeRE = /^\.\.\//;
console.log(chalk_1.default.green("Unpacking \uD83D\uDECD your source\u00A0maps \uD83D\uDDFA"));
var sources = consumer.sources;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's probably better to stict to ES6 lets and consts instead of an outdated var.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants