Comments (6)
Thanks for the gist, that's always helpful. I'll take a look and get back to you.
On a quick glance I'm wondering if the slash in "exclude": ["node_modules/"]
is affecting it? That's purely a guess and I haven't tried it but might be worth a quick shot to remove the slash.
from ts-loader.
The exclude option is already supported since that functionality is delegated to TypeScript. Keep in mind that the exclude option only functions if you are not specifying a files
property and it only affects the initial list of files to load. It does not "ban" files from being included in the program through other means like import
or tripleslash references. I just ran some quick tests and the loader seems to work identically to tsc
. If you have a scenario where it doesn't please let me know.
If I get this right, this plugin just goes for the "files" option in the tsconfig, else loads all files (regardless of webpack configuration).
Not quite. The webpack entry points are definitely where things "start". However, any additional files specified in tsconfig.json are also loaded into the program. Note that this does not mean they'll necessarily be emitted since webpack controls what is and isn't emitted based on the dependency tree starting at the entry point. In other words you could specifically include some file, say b.ts
, using tsconfig.json but if your entry point nor any of its dependencies actually import
it then it won't be emitted into the webpack bundle.
from ts-loader.
Going to close this since I don't think there's an actual issue but feel free to reopen if that's incorrect.
from ts-loader.
I've created an Gist with this problem: https://gist.github.com/sateffen/bfbafa46b181098c9eee
Every grunt build
or grunt test
will complain about files in the node_modules folder, even though I excluded it in tsconfig.json and the configurations.
Maybe I'm doing something else wrong, but when putting only the files to include in the tsconfig.json, everything works fine.
Do you have any idea?
from ts-loader.
Wow, this actually works.
So my problem all the time was, that the slash was there. Without slash everything works fine. That is good to know.
Ok, so the problem was me, not your loader. Big thanks, and sorry for the report!
from ts-loader.
No worries, these things happen 😄
from ts-loader.
Related Issues (20)
- node8.11.1 reported an error, reported incompatibility
- Updating to [email protected] results in TS2502: 'AbortController' is referenced directly or indirectly in its own type annotation when used with @types/[email protected] HOT 1
- [deps] Check for breaking changes in dependency updates
- Add support for using keyword (TypeScript 5.2) HOT 7
- ts-loader inconsistent with ts compiler
- CVE-2023-28154 - Upgrade WebPack to 5.76.0 HOT 2
- ts-loader fails on stage 3 decorators: Unexpected character '@' HOT 1
- projectReferences does not build with the specified tsconfig
- After upgrading from 8.4.0 to 9.4.4, startup of a nodejs/electron app doubled HOT 3
- ts-loader can't load Typescript with any version > 5.0.4 HOT 4
- Dynamic imports with a dynamic expression are not chunked/loaded correctly HOT 1
- Is there a way to hide private method after build?
- Error when upgrading ts-loader HOT 8
- Safari shows "An error occurred trying to load the resource." when loading ts breakpoint
- Add native support for tsconfig `compilerOptions.paths`
- The 'files' list in config file 'tsconfig.json' is empty. HOT 2
- Loading custom file leads to TS2307 (Cannot find module) HOT 4
- ts-loader forces 'isolatedModules' enabled when transpileOnly: true
- Question: generate `d.ts` files for each entry
- How to silent any error from ts-loader? 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 ts-loader.