by

## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Nov 29 2019 07:57
Diokuz opened #649
• Nov 28 2019 02:47
javaxiu commented #364
• Nov 26 2019 10:34
peterzernia closed #648
• Nov 26 2019 10:34
peterzernia commented #648
• Nov 22 2019 10:54
peterzernia edited #648
• Nov 22 2019 10:54
peterzernia opened #648
• Nov 17 2019 18:05
vijeeshks commented #146
• Nov 14 2019 23:24
AlonMiz commented #364
• Nov 13 2019 20:57
akoidan commented #356
• Nov 13 2019 09:51
ozknemoy commented #497
• Nov 12 2019 17:28
fatso83 commented #497
• Nov 05 2019 08:20
limbosounds commented #372
• Oct 31 2019 17:37
gingerchris synchronize #647
• Oct 31 2019 17:35
gingerchris opened #647
• Oct 28 2019 02:31
hackape synchronize #629
• Oct 21 2019 07:57
dionisoros commented #612
• Oct 11 2019 10:43
gingerchris commented #638
• Oct 11 2019 05:39
TheGrimSilence opened #646
• Oct 10 2019 03:45
MacKentoch commented #623
• Oct 10 2019 03:45
MacKentoch commented #623
Passiday
@Passiday
For example, how can I see if certain ts file is even passed to the awesome-typescript-loader?
Webpack build output contains this:
chunk {0} main.bundle.js, main.map (main) 1.22 kB {2} [rendered]
[./src/main.ts] ./src/main.ts 1.18 kB {0} [built]
[0] multi main 40 bytes {0} [built]
Passiday
@Passiday
Dammit, my webpack ignores module.rules setting in config, but respects module.loaders. Go figure.
Nikos
@quantuminformation
Liren Sun
@sunliren2005
Hi, I was getting out of memory issue when I use npm link with TsConfigPathsPlugin. I was using webpack 2.2.1 and atl 3.1.2. I did not put any options in TsConfigPathsPlugin. Did I miss anything?
the oom error happened when compile the parent project
Abhimanyu Singh Rathore
@abhirathore2006
Hi, i am trying to create a module which is linked with another project, when i use at-loader its not generating deceleration files even after setting outDir and declaration:true
Danny Bullis
@theBull
Hi, can anyone please tell me why the paths property in my tsconfig file is getting completely ignored by webpack, even after using awesome-typescript-loader and ts-loader?
Sven-Michael Stübe
@smstuebe
Hi, is it possible to configure the atl to just compile files that are referenced (directly, indirectly) from the entry? I want to port an existing application and wan't to be able to compile it in between when some unreferenced files are not compilable.
Sven-Michael Stübe
@smstuebe
ahh "files": [] has to be placed in tsconfig
Yaroslav Yakovlev
@yaroslavya
@smstuebe you can provide a separate tsconfig file for atl via query
Ambuj
@SharpieX
hi as i understand awesome-typescript-loader loader pick up tsconfig.json placed in root folder
but in my case i dont think this is happening
can somebody point me in right direction
Yaroslav Yakovlev
@yaroslavya
@SharpieX can you give more details on your setup? Why do you think tsconfig.json is not picked up properly?
mrucelum
@mrucelum
Hi, I noticed that the generated .js files are deleted after the bundle was created, while the .d.ts files are kept. Is there a way to configure the plugin (or webpack itself?) to keep the generated *.js files as well? Couldn't find any configuration option for that (neither for the plugin nor for webpack itself).
Darryl Daniel
@darryldaniel
Hi. I'm trying to upgrade an application from webpack 1 to 2 and cannot because it relies heavily on webpack aliasing (but not at all on typescript paths). This doesn't seem to be supported by awesome-typescript-loader at present. Any word on a resolution for this?
Ryan Ham

I don't know that this issue is directly related to ATL, but when I use ATL and declaration: true tsconfig settings, interfaces are ignored and not generated in d.ts files unless a class implements that interface from within the same file (even if other files have classes which implement the interface).

for example:

// src/shape.ts
export interface Shape {
getArea(): number;
}

export class Circle implements Shape {
getArea() {
throw 'no';
}
}

in the case above, src/shape.d.ts will be created and will contain an interface declaration for Shape.

// src/shape.ts
export interface Shape {
getArea(): number;
}

// src/shapes/circle.ts
import { Shape } from '../shape.ts';

export class Circle implements Shape {
getArea() {
throw 'no';
}
}

In this case, shape.d.ts is never generated, but circle still references it, so I get errors when using the bundle from another project.
Any thoughts? Again, might not be ATL.

Ryan Ham
I can confirm that this behavior is not the same when just using tsc to compile.
Abhimanyu Singh Rathore
@abhirathore2006
@superamadeus yes that's true, i had to face similar issue when i migrated from tsc, one of my class was using an interface which wasn't exported from project but worked fine with tsc, however ATL didn't generate the declaration for that, it only generates the declaration if something is exported from the file.
I forked the repo and added an appendTsSuffixTo option that makes Typescript in .vue files work. https://github.com/Adam-Meisen/awesome-typescript-loader
Obviously docs have to be changed, commits have to be squashed, and tests added, so let me know if this isn't a feature that would get merged before I do that
I'll probably just make a pull request for discussion anyway
ValeryLosik
@ValeryLosik
Hi guys!
I have project A which uses baseDir in tsconfig.json and all imports go from root folder and another project which uses projectA as node dependency.Now I am getting errors of importing caused by projectA.What is a preferred strategy to resolve it?As I understand at-loader is not able to work with several tsconfigs at a time or does it?Appreciate for advice
Remo H. Jansen
@remojansen
The webpack build timesout for me
It is stuck after [at-loader] Using typescript@2.4.1 from typescript and "tsconfig.json" from /home/rjansen/CODE/core/tsconfig.json.
Bagaev Dmitri
@bvdmitri
Has anyone encountered this error?
TypeError: Cannot read property 'parentCompilation' of undefined
Valentin Golev
@va1en0k
hi! i tried to add typescript to my (ejected) react-scripts project and i get an error
[at-loader] ./src/math.ts:1:18 TS2304: Cannot find name '__webpack_public_path__'.
i have no idea what can it be about
there's no such thing in my code
my best guess is that it uses the pre-transpiled output, but the rules of webpack unambiguously send *.ts to at-loader
Victor Guilherme Santos Hogemann
@vhogemann
Hi there, trying to develop a module with npm link, and I’m getting this from at-loader: 'rootDir' is expected to contain all source files.
Any insights?
I’m declaring “types” on the linked package
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true,
"moduleResolution": "node",
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"rootDir": "./src",
"experimentalDecorators": true,
"typeRoots": [
"./node_modules/@types"
],
"types": [
"jasmine",
"node",
"core-js",
"protractor"
],
"baseUrl": "./src",
"paths": {
"*": ["../node_modules/*", "*"]
}
},
"exclude": [
"node_modules"
],
"silent": true
}
}
This is my tsconfig.json
Siva Sankar
@hisivasankar
Hi guys, docs says TsConfigPathsPlugin plugin can be used only with webpack 2.1
I am using webpack 3.1 and its not working
Any idea?
@vhogemann setting rootDir: './' might help. But am not really sure!
lucho78
@lucho78
Did you try with Webpack 4.0.1
I tried this morning and it does not work

node node_modules/husky/bin/install.js || true

module.js:540
throw err;
^

Aleksandr Filatov
@greybax
build compilation time seems dramatically decreased for me after update at-loader to 5.0.0 version
Did anybody faces with it?
I have
  "awesomeTypescriptLoaderOptions": {
"skipDeclarationFilesCheck ": true,
"transpileOnly": true
},
Hlöðver Sigurðsson
@hlolli
Hi is anybody's here. I feel bit lost trying to change the printed [at-loader] error messages in my terminal, so that I can see a snippet around a failing source code, instead of line number to the source file. Is this somewhere configureable?
Luis Manuel Averhoff
@LuisAverhoff

Hello, I enabled the useBabel property because there is a node module that I'm using that is using the spread operator and one of the browsers that I'm trying to support is edge and edge doesn't have support for object spread operator.

This means the spread operator in that module needs to be transpile to use object.assign. I've tried using the exclude and include property of the loader in so many different ways but none of them have helped.

I don't know if it's babel that is the issue or if it's awesome-typescript-loader. I'm using a preset called babel edge that uses @babel/preset-env, babel/plugin-proposal-object-rest-spread and many more plugins built in this preset.

Here is my webpack.config.js(simplified to only show the loaders)

{
{
test: /\.js$/, use: [{ loader: 'source-map-loader' }], enforce: 'pre', exclude: /node_modules/ }, { test: /\.tsx?$/,
use: [
{
options: {
useTranspileModule: true,
forceIsolatedModules: true,
useCache: true,
useBabel: true,
babelOptions: {
babelrc: false /* Important line */,
presets: [['edge', { transpile: 'modern', modules: false }]]
},
reportFiles: ['src/**/*.{ts,tsx}'],
babelCore: '@babel/core'
},
}