Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

enable client sourcemaps #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

qbikez
Copy link

@qbikez qbikez commented Jul 22, 2022

Generate client-side sourcemaps (controlled by GENERATE_SOURCEMAP variable).

@@ -80,6 +83,12 @@ module.exports = (options, callback) => {
const wrappedBundle = reactComponentWrapper(bundleHash, bundle);
fs.outputFileSync(bundlePath, wrappedBundle);

if (generateSourceMaps) {
const sourceMap = memoryFs.readFileSync(`/build/${config.output.filename}.map`, 'UTF8');
const mapBunldePath = path.join(publishPath, `${publishFileName}.map`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo, I guess this should be mapBundlePath

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

Successfully merging this pull request may close these issues.

2 participants