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

Fix gjs/gts sourcemaps -- we accidentally unlocked really good DX #2166

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removing this makes this PR a breaking change... but inline source map is likely never something anyone wants as it hasn't been compatible with rollup.

So... this PR "could" be a bugfix, I suppose.

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
Loading