Skip to content

Commit

Permalink
Add /stream-provider export (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz authored Jul 23, 2024
1 parent 9068123 commit e6ccaed
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ gen_enforced_field(WorkspaceCwd, 'exports["./package.json"]', './package.json').

% The list of files included in the package must only include files generated
% during the build step.
gen_enforced_field(WorkspaceCwd, 'files', ['dist']).
gen_enforced_field(WorkspaceCwd, 'files', ['dist', 'stream-provider.js']).

% If a dependency is listed under "dependencies", it should not be listed under
% "devDependencies".
Expand Down
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,24 @@
"default": "./dist/StreamProvider.cjs"
}
},
"./stream-provider": {
"import": {
"types": "./dist/StreamProvider.d.mts",
"default": "./dist/StreamProvider.mjs"
},
"require": {
"types": "./dist/StreamProvider.d.cts",
"default": "./dist/StreamProvider.cjs"
}
},
"./package.json": "./package.json"
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"files": [
"dist"
"dist",
"stream-provider.js"
],
"scripts": {
"build": "ts-bridge --project tsconfig.build.json --clean",
Expand Down
3 changes: 3 additions & 0 deletions stream-provider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Re-exported for compatibility with Browserify.
// eslint-disable-next-line
module.exports = require('./dist/StreamProvider.cjs');

0 comments on commit e6ccaed

Please sign in to comment.