Comments (3)
Durn, I could have sworn I had tried the moduleResolution
options. My apologies!
I'm creating user scripts that inject into Stack Exchange, so the final output is self-contained and I had not given this parameter enough thought.
from stacks-icons.
Just to be clear: I am nowhere near confident that my diagnosis is correct.
I do have a work-around, you can use the paths
option in tsconfig.json
to force resolution:
{
"compilerOptions": {
"moduleResolution": "node",
"target": "ES2020",
"baseUrl": "./",
"paths": {
"@stackoverflow/stacks-icons/icons": ["node_modules/@stackoverflow/stacks-icons/dist/icons"]
}
},
"files": ["index.ts"]
}
That's the same tsconfig.json
but with baseUrl
and paths
added.
from stacks-icons.
We are using package.json subpath exports in stacks-icons to map paths to specific entrypoints:
https://github.com/StackExchange/Stacks-Icons/blob/production/package.json#L11-L22
You are using "moduleResolution": "node"
which does not support package.json exports
.
The value "node"
represents the resolution of Node 10, which never included package.json exports
support (exports
started to be supported from Node 12+).
If you change the moduleResolution
value to nodenext
(or any node >= 12) everything should work as expected.
For more context: microsoft/TypeScript#51901
from stacks-icons.
Related Issues (20)
- Update Enterprise logo. Add Teams, Talent, Engagement HOT 3
- Export PNG versions of the icon set
- SVG Files are missing XMLNS, thus failing to load HOT 1
- Add an icon for Discord HOT 2
- TrashSm
- More editor-related icons
- Figma integration
- Support a wider range of emotions
- New icon: download HOT 3
- Define a richer aesthetic
- @Svg.Tada isn't fully greyscale HOT 1
- New icon: Jira HOT 1
- Add a preview of the final icon output
- Add diff icons
- Conflicting gradient IDs are causing strange coloring
- Guide for usage in Markdown HOT 1
- Deliver icons as backgrounds for high-traffic situations HOT 8
- Deliver as a nuget package
- Add an icon for columns HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stacks-icons.