Skip to content

Commit

Permalink
Merge pull request #2166 from embroider-build/content-tag-pr-86
Browse files Browse the repository at this point in the history
Fix gjs/gts sourcemaps -- we accidentally unlocked really good DX
  • Loading branch information
mansona authored Nov 11, 2024
2 parents 1d712ae + 653a69a commit d0a9396
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/addon-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"dependencies": {
"@embroider/core": "workspace:^",
"@rollup/pluginutils": "^4.1.1",
"content-tag": "^2.0.1",
"content-tag": "^3.0.0",
"fs-extra": "^10.0.0",
"minimatch": "^3.0.4",
"rollup-plugin-copy-assets": "^2.0.3",
Expand Down
8 changes: 3 additions & 5 deletions packages/addon-dev/src/rollup-gjs-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ const PLUGIN_NAME = 'rollup-gjs-plugin';
const processor = new Preprocessor();
// import { parse as pathParse } from 'path';

export default function rollupGjsPlugin(
{ inline_source_map } = { inline_source_map: true }
): Plugin {
export default function rollupGjsPlugin(): Plugin {
return {
name: PLUGIN_NAME,

Expand All @@ -20,12 +18,12 @@ export default function rollupGjsPlugin(
if (!gjsFilter(id)) {
return null;
}
let code = processor.process(input, {
let { code, map } = processor.process(input, {
filename: id,
inline_source_map,
});
return {
code,
map,
};
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/addon-dev/src/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class Addon {
return hbs(options);
}

gjs(options?: { inline_source_map: boolean }) {
return gjs(options);
gjs() {
return gjs();
}

// this does incremental updates to the dist files and also deletes files that are not part of the generated bundle
Expand Down
10 changes: 7 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0a9396

Please sign in to comment.