sandpack
sandpack copied to clipboard
Normalize files paths
Tell us how you think we can improve Sandpack
Standardize and normalize the files paths provide by:
- Templates;
- Files props;
- External sandboxes (future feature #347);
- Package.json creation;
How would your idea work?
- Add leading slash;
- Remove leading dot (?);
- Make sure it doesn't affect
activePathandopenPaths;
What are invalid and valid file paths you can pass to files object?
Valid:
- "./";
- "/foo.ts";
- "/foo" no extension;
- "foo.ts" no leading;
Invalid
- "/"
- "..."
- "..fooo"