Skip to content

Commit

Permalink
Merge pull request #2082 from embroider-build/public-assets-hide-path…
Browse files Browse the repository at this point in the history
…-3rd

Hide base path from public URL of rollup-public-assets
  • Loading branch information
simonihmig authored Oct 1, 2024
2 parents e9b6d77 + da42d46 commit 4a546a7
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 4a546a7

Please sign in to comment.