Skip to content

Commit 2357a62

Browse files
committed
fix(webpack): explicitly load the webpack typings
closes #700
1 parent 6464532 commit 2357a62

4 files changed

Lines changed: 9 additions & 22 deletions

File tree

lib/commands/new/buildsystems/cli/transpilers/typescript.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ module.exports = function(project) {
88

99
project.addToContent(
1010
ProjectItem.resource('tslint.json', 'content/tslint.json'),
11-
ProjectItem.resource('tsconfig.json', 'content/tsconfig.json'),
11+
ProjectItem.resource('tsconfig.json', 'content/tsconfig.template.json')
12+
.asTemplate(project.model),
1213
ProjectItem.directory('custom_typings')
1314
).addToTasks(
1415
ProjectItem.resource('transpile.ts', 'tasks/transpile.ts')

lib/commands/new/buildsystems/webpack/transpilers/typescript.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ const ProjectItem = require('../../../../../project-item').ProjectItem;
33

44
module.exports = function(project) {
55
project.addToContent(
6-
ProjectItem.resource('tsconfig.json', 'content/tsconfig.json'),
6+
ProjectItem.resource('tsconfig.json', 'content/tsconfig.template.json')
7+
.asTemplate(project.model),
78
ProjectItem.directory('custom_typings')
89
.add(
910
ProjectItem.resource('fetch.d.ts', 'content/custom_typings_webpack/fetch.d.ts'),

lib/resources/content/tsconfig-webpack.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

lib/resources/content/tsconfig.json renamed to lib/resources/content/tsconfig.template.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"moduleResolution": "node",
1414
"lib": ["es2017", "dom"]
1515
},
16+
// @if bundler.id='webpack'
17+
"files":[
18+
"./node_modules/@types/webpack/index.d.ts"
19+
],
20+
// @endif
1621
"exclude": [
1722
"node_modules",
1823
"aurelia_project"

0 commit comments

Comments
 (0)