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

feat(cli): Option to inline JS source maps during sync #5843

Merged
merged 8 commits into from
Aug 12, 2022

Conversation

theproducer
Copy link
Contributor

Adds an option to the sync command , --inline, which will, after syncing, inline all JS source maps for easier debugging on mobile devices.

import type { Config } from '../definitions';
import { logger } from '../log';

function findJSAssetsDir(buildDir: string): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

JS files could be any folder. Im not sure you would want to hard code this for React and Vue.


function findJSAssetsDir(buildDir: string): string {
const reactJSDir = '/static/js';
const vueJSDir = '/js';
Copy link
Contributor

Choose a reason for hiding this comment

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

Path.join is required for folder separators which will change based on platform (eg on windows its \ rather than /)

Copy link
Contributor

@dtarnawsky dtarnawsky left a comment

Choose a reason for hiding this comment

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

Im a little concerned you'll miss JS files if you hardcode a subfolder in the output directory.

Copy link
Contributor

@dtarnawsky dtarnawsky left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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.

None yet

4 participants