Skip to content

Commit

Permalink
feat(cli): inline CSS sourcemaps in addition to JS sourcemaps
Browse files Browse the repository at this point in the history
This change updates the cli copy's `--inline` handling to also inline
the CSS sourcemaps and not just the JS sourcemaps.
  • Loading branch information
terencehonles committed Apr 20, 2023
1 parent a090dd3 commit 8c8a545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/tasks/sourcemaps.ts
Expand Up @@ -19,7 +19,7 @@ function walkDirectory(dirPath: string) {
walkDirectory(targetFile);
} else {
const mapFile = join(dirPath, `${file}.map`);
if (extname(file) === '.js' && existsSync(mapFile)) {
if ((extname(file) === '.js' || extname(file) === '.css') && existsSync(mapFile)) {
const bufMap = readFileSync(mapFile).toString('base64');
const bufFile = readFileSync(targetFile, 'utf8');
const result = bufFile.replace(
Expand Down

0 comments on commit 8c8a545

Please sign in to comment.