Skip to content

Commit

Permalink
Minimal showcase for TypeStrong/ts-loader/issues/919
Browse files Browse the repository at this point in the history
  • Loading branch information
KnisterPeter committed May 9, 2019
0 parents commit f6b9729
Show file tree
Hide file tree
Showing 7 changed files with 5,855 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
node_modules/

23 changes: 23 additions & 0 deletions package.json
@@ -0,0 +1,23 @@
{
"private": true,
"name": "ts-loader-minimal-jest-failure",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/jest": "^24.0.12",
"@types/webpack": "^4.4.31",
"jest": "^24.8.0",
"ts-loader": "6",
"typescript": "^3.4.5",
"webpack": "^4.31.0",
"webpack-cli": "^3.3.2",
"webpack-dev-server": "^3.3.1"
}
}
5 changes: 5 additions & 0 deletions src/index.test.ts
@@ -0,0 +1,5 @@
import { foo } from ".";

test('test foo', () => {
expect(foo()).toBeUndefined()
})
3 changes: 3 additions & 0 deletions src/index.ts
@@ -0,0 +1,3 @@
export function foo() {
return undefined
}
11 changes: 11 additions & 0 deletions tsconfig.json
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "es2017",
"module": "esnext",
"outDir": "./dist",
"rootDir": "./",
"strict": true,
"moduleResolution": "node",
"esModuleInterop": true
}
}
23 changes: 23 additions & 0 deletions webpack.config.js
@@ -0,0 +1,23 @@
// @ts-check
/** @typedef {import('webpack').Configuration} Configuration */

const path = require('path');

/** @type Configuration */
module.exports = {
mode: 'development',
entry: './src/index',
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js'
},
resolve: {
extensions: ['.tsx', '.ts', '.js']
},
module: {
rules: [{
test: /\.tsx?$/,
use: 'ts-loader'
}]
}
}

0 comments on commit f6b9729

Please sign in to comment.