Skip to content

Commit

Permalink
Hide base path from public URL of rollup-public-assets
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Aug 28, 2024
1 parent 57f99b0 commit da42d46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/addon-dev/src/rollup-public-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function publicAssets(
});
const publicAssets: Record<string, string> = filenames.reduce(
(acc: Record<string, string>, v): Record<string, string> => {
const namespace = opts?.namespace ?? join(pkg.name, path);
const namespace = opts?.namespace ?? pkg.name;

acc[`./${path}/${v}`] = resolve('/' + join(namespace, v));
return acc;
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/v2-addon-dev-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export { SingleFileComponent as default };
let expectNoNamespaceFile = expectFilesAt(inDependency(app, 'v2-addon-no-namespace').dir, { qunit: assert });

expectFile('package.json').json('ember-addon.public-assets').deepEquals({
'./public/thing.txt': '/v2-addon/public/thing.txt',
'./public/thing.txt': '/v2-addon/thing.txt',
});
expectNoNamespaceFile('package.json').json('ember-addon.public-assets').deepEquals({
'./public/other.txt': '/other.txt',
Expand Down

0 comments on commit da42d46

Please sign in to comment.