Skip to content

Commit 6f6122a

Browse files
authored
Allow the Node.js pkg importer to return the same URL multiple times (sass#2059)
1 parent ae76e7e commit 6f6122a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

js-api-spec/node-package-importer.node.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,21 @@ describe('Node Package Importer', () => {
206206
});
207207
}));
208208

209+
it('allows multiple identical matching exported paths', () =>
210+
testPackageImporter({
211+
input: '@use "pkg:foo/src/sass/styles";',
212+
output: 'a {b: c;}',
213+
files: {
214+
'node_modules/foo/src/sass/_styles.scss': 'a {b: c}',
215+
'node_modules/foo/package.json': JSON.stringify({
216+
exports: {
217+
'./*': {sass: './*'},
218+
'./src/*': {sass: './src/*'},
219+
},
220+
}),
221+
},
222+
}));
223+
209224
it('throws if resolved path does not have a valid extension', () =>
210225
sandbox(dir => {
211226
dir.write({

0 commit comments

Comments
 (0)