Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Declaration file sub-folder issue #193

Open
MeirionHughes opened this issue Jul 14, 2016 · 1 comment
Open

Declaration file sub-folder issue #193

MeirionHughes opened this issue Jul 14, 2016 · 1 comment

Comments

@MeirionHughes
Copy link

I have an entry ./source/index.ts,
which correctly compiles to ./dist/index.js,
but for some reason when enable declarations I get ./dist/source/index.d.ts

Is there a way to fix this to ./dist/index.d.ts ? :)

"awesome-typescript-loader": "^2.0.2",
"typescript": "^2.0.0",
"webpack": "^2.1.0-beta.17"

module.exports = {
  entry: {
    index: __dirname + '/source/index'
  },
  output: {
    path: __dirname + '/dist',
    filename: 'index.js'
  },
  resolve: {
    root: __dirname,
    extensions: ['', '.ts', '.js']
  },
  module: {
    loaders: [
      { test: /\.ts$/, loaders: ['awesome-typescript-loader'] }
    ]
  }
}
@ghost
Copy link

ghost commented Sep 30, 2016

#136 ?

gonzofish added a commit to gonzofish/angular-librarian that referenced this issue Mar 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 free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant