Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Emit declaration files into the correct location based on WebPack's context#136

Open
bryanforbes wants to merge2 commits intos-panferov:master
base:master
Choose a base branch
Loading
frombryanforbes:declaration-emit

Conversation

@bryanforbes
Copy link

Given the following project structure:

project/    src/        thing1.ts        thing2.ts

and the following WebPack configuration:

module.exports={context:'src',entry:{thing1:'thing1.ts',thing2:'thing2.ts'},output:{path:path.join(__dirname,'dist'),filename:'[name].js',libraryTarget:'umd'},resolve:{extensions:['','.ts','.js'],root:'src'},module:{loaders:[{test:/\.ts$/,loader:'awesome-typescript-loader',query:{declaration:true}}]}};

The following directory structure is created:

project/    dist/        src/            thing1.d.ts            thing2.d.ts        thing1.js        thing2.js

This pull request updates the declaration file destination calculation to use WebPack'sloaderUtils to determine where to emit the declaration file. This pull request does not cover "elided" declaration files which will still output with the incorrect path.

@s-panferov
Copy link
Owner

@bryanforbes thanks for the PR! I need to make some research to find the best way to store declaration files. I'll try not to prolong this.

bryanforbes and devopsmariocom reacted with thumbs up emoji

@ghostghost mentioned this pull requestSep 30, 2016
gonzofish added a commit to gonzofish/angular-librarian that referenced this pull requestMar 1, 2017
There is [an outstanding awesome-typescript-loader issue](s-panferov/awesome-typescript-loader#193) and [an unmerged PR](s-panferov/awesome-typescript-loader#136) which talk to this issue.Seems that, for the .d.ts files, ATL doesn't understand the Webpack context properly when outputting files.
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@bryanforbes@s-panferov

[8]ページ先頭

©2009-2025 Movatter.jp