Questions tagged [ts-loader]
214 questions
9
votes
0 answers
fork-ts-checker-webpack-plugin giving errors about @types and Mocha
I'm using ts-loader and fork-fs-checker-webpack-plugin in a project, and it's complaining about node_modules/@types, for example:
ERROR in D:/temp/temp-vscode/temp-electron/application-volume- change/node_modules/@types/react/index.d.ts
ERROR in…

Farzad
- 1,770
- 4
- 26
- 48
9
votes
1 answer
React Monorepo yarn workspaces + typescript + absolute imports
I'm having issues setting up an React project with yarn workspaces and typescript.
My folder structure is:
-root
-package.json
-workspaces
-web
-common
and my package.json file is:
{
"name": "my-project-name",
"private": true,
…

Guilherme
- 503
- 4
- 15
9
votes
2 answers
Optimize Angular 2 application build duration with webpack
I build an Angular 2 application and bundle it with webpack.
At the moment, my application is still small but the webpack task already takes around 10 seconds.
Is it possible to optimize my webpack config or the TypeSript compilation options to…

bviale
- 5,245
- 3
- 28
- 48
9
votes
1 answer
Webpack resolve.root and TypeScript loader
Our project is using the webpack resolve.root option to import modules with absolute paths. (avoiding something like ../../../module)
In its current state the project is using babel-loader which works perfectly fine.
My task is to migrate the app to…

Marc
- 1,531
- 1
- 11
- 14
8
votes
1 answer
webpack thread-loader with ts-loader
I have the following rule in my webpack config:
{
test: /(\.tsx?)$/,
use: [{
loader: 'thread-loader'
},
{
loader: 'ts-loader',
options: {
…

Chris
- 13,100
- 23
- 79
- 162
7
votes
3 answers
Vuetify 2 Type Errors: Cannot find name 'DefaultProps'
Since i updated my project to use the new 2.x release of Vuetify (https://vuetifyjs.com) i get some Type Errors during compile and i don't know how to get rid of them. Properly just my tsconfig is off somehow.
i checked the docs and made sure to…

Sebastian Bresin
- 79
- 4
7
votes
2 answers
how to specify typescript version to ts-loader?
I'm installing ts-loader to work with webpack.
Does someone know how to choose which typescript version to use ?
No matter what I do, I always get a message saying
ts-loader: Using typescript@1.8.10 and /app/tsconfig.json
I intend to use…

aherve
- 3,795
- 6
- 28
- 41
7
votes
0 answers
Webpack build with ts-loader giving warnings about typings
I have the following development setup:
Angular2 (with Typescript)
Webpack for packaging
Karma as a test runner for Jasmine tests
Gulp for invoking Karma
Karma is configured as follows:
var webpackConfig =…

Joel Brighton
- 91
- 7
7
votes
2 answers
Typescript Source not showing when using webpack ts-loader
I'm using webpack and ts-loader from a grunt task to transpile Typescript and generate sourcemaps for use debugging production. My team wants to be able to see the original Typescript source, not just the JavaScript source. I have pored over many…

GLaDOS
- 683
- 1
- 14
- 29
6
votes
4 answers
Migrating from ES5 to TS gradually
I am running on a huge project with thousands of .js files that are written in es5, and for many reasons and benefits of TS, we've decided to start migrating to TS, after a couple of days and many pieces of research, I am going to elaborate a couple…

Abdulrahman Falyoun
- 3,676
- 3
- 16
- 43
6
votes
1 answer
Wrong line numbers in component stack trace [TS + React]
Problem
I'm adding an error boundary to my client-side React app. In development, I want to display the error with a stack trace in the browser window, similar to create-react-app's or nextjs's error overlays. Using webpack's devtool option, I'm…

ericgio
- 3,094
- 4
- 25
- 44
6
votes
1 answer
What's the difference between tsconfig's 'outFile' and webpack config's 'output'
What's different between the 'output' path? Is tsconfig is a loader? And webpack to resolve '.ts' file after the run tsconfig build?
Why the file 'src.js' is not found? It is deleted by webpack automatically?
tsconfig.json:
{
…

Free Tears
- 347
- 1
- 3
- 13
6
votes
0 answers
webpack 2 ts loader doesn't exclude spec file
I'm trying to build my own angular2/webpack2 boilerplate
this is my set up
webpack.common.js
const webpack = require('webpack');
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
const ExtractTextPlugin =…

Whisher
- 31,320
- 32
- 120
- 201
6
votes
2 answers
Exclude ts/js file from bundle using webpack
I am new to webpack. Currently I am working on angular2 application with webpack. As part of requirement we want to have a settings file which should not be bundled so that one can change URL in settings.js file after bundle also.
Below is the code…

Hardik Patel
- 3,868
- 1
- 23
- 37
5
votes
1 answer
ts-loader outputs declaration files in subdirectory when importing .json files
I'm having a strange behavior of my ts-loader: When importing *.json file from node_modules the declaration files are generated in a subfolder of dist/ but I expect them to be directly in the dist/ folder.
I have following project…

Psalchow
- 93
- 1
- 6