Skip to content
This repository was archived by the owner on May 29, 2022. It is now read-only.

Commit f212585

Browse files
committed
fix(all): add regenerator-runtime to the webpack config for the 1.1.1 version of typescript-loader
1 parent 796928b commit f212585

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@
3838
"typings": "^1.3.0"
3939
},
4040
"dependencies": {
41+
"awesome-typescript-loader": "^1.1.1",
4142
"babel-core": "^6.9.1",
4243
"babel-polyfill": "^6.9.1",
4344
"babel-preset-es2015": "^6.9.0",
4445
"babel-preset-es2015-loose": "^7.0.0",
4546
"babel-preset-es2015-loose-native-modules": "^1.0.0",
46-
"awesome-typescript-loader": ">=2.0.0-rc.3 || ^2.0.0"
47+
"regenerator-runtime": "^0.9.5"
4748
},
4849
"peerDependencies": {
4950
"@easy-webpack/core": "*"

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {WebpackConfig, get} from '@easy-webpack/core'
22
import * as path from 'path'
33
import {ForkCheckerPlugin} from 'awesome-typescript-loader'
4+
import 'regenerator-runtime/runtime'
45

56
/**
67
* Typescript loader support for .ts
@@ -10,8 +11,7 @@ export function typescript(options = {}, exclude: Array<string> = null) {
1011
return function typescript(this: WebpackConfig): WebpackConfig {
1112
return {
1213
resolve: {
13-
extensions: ['', '.ts', '.js']
14-
//get(this, 'resolve.extensions', ['', '.js']).concat(['.ts'])
14+
extensions: get(this, 'resolve.extensions', ['', '.js']).concat(['.ts'])
1515
},
1616
module: {
1717
loaders: get(this, 'module.loaders', []).concat([{

0 commit comments

Comments
 (0)