Comments (5)
Hey @igmdvc! Thanks for contributing.
When would you want to use the module property instead of what the cjs resolver currently provides? Can you provide an example? Just having a hard time understanding the problem that the module property solves.
from node-filing-cabinet.
Hey @mrjoelkemp,
I am working on a code splitting tool based on node. One of the dependencies is angular, which declares not only main property for ES5 bundles, but also the module one pointing to an ES2015 module bundle. As the bundle I am using is based on ES2015 modules, I would like to choose how to resolve the files from angular or other modules that declares the module property as an entrypoint for es6 files.
Here you have an article that explains the situation:
https://nodesource.com/blog/es-modules-and-node-js-hard-choices/
from node-filing-cabinet.
Sounds great. Would you want to provide a flag to filing-cabinet that turns this mode on? If so, would love to see what the changes would look like in a PR.
from node-filing-cabinet.
For sure, I have some code ready to be added as a PR. Just give me permissions and I will create it
from node-filing-cabinet.
@igmdvc awesome to hear. You can fork the repo and submit a PR. Looking forward to reviewing it.
from node-filing-cabinet.
Related Issues (20)
- Not all imports in TypeScript are detected. HOT 4
- Resolves to wrong version
- Fails with an error when resolving import of the js file that has the same-named ".d.ts" type-definition file HOT 1
- When `noTypeDefinitions` is enabled and the extension `.d.ts` is found, a crash can occur. HOT 1
- tsConfig argument conflates two different objects
- `failedLookupLocations` no longer exists in Typescript HOT 1
- Use Rust / Zig implementation of enhanced resolve
- configure NODE_PATH? HOT 1
- Allow alternative fs to be used for reading files. HOT 1
- Tests assertions fail on windows under vscode due to / versus \ in paths. HOT 1
- what should I do if I don't want to parse the module from node_module? for example, import * as api from 'util', 'util' is not a node_module, it is a file under the current path. HOT 6
- Filename not given HOT 7
- Typescript module resolution does not resolve arbitrary file extensions
- Resolving symlink real paths for js resolver HOT 1
- Consider supporting Webpack configurations that export a Promise
- Issue in tsConfig options resolving HOT 3
- Allow multiple default lookups for projects with JS and TS usage HOT 2
- returns empty path for require'd json file w/ no extension HOT 1
- allow non-singleton usage HOT 2
- webpack config appears to be re-executed once for every resolve attempt HOT 2
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 node-filing-cabinet.