Created
December 27, 2016 15:46
-
-
Save darkyen/f5d0549f769d7159102b17c82fbf00fd to your computer and use it in GitHub Desktop.
Problem, everything gets compiled, files not even required.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"target": "es6", | |
"noImplicitAny": false, | |
"sourceMap": true, | |
"alwaysStrict": true, | |
"experimentalDecorators": true, | |
"moduleResolution": "node", | |
"jsx": "react" | |
}, | |
"typeAcquisition": { | |
"enable": true | |
}, | |
"exclude": [ | |
"node_modules" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: './src/test/webtask', | |
output: { | |
filename: 'main.js' | |
}, | |
resolve: { | |
// Add `.ts` and `.tsx` as a resolvable extension. | |
extensions: ['.ts', '.tsx', '.js'] | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.tsx?$/, | |
use: { | |
loader: 'awesome-typescript-loader', | |
} | |
} | |
] | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Webtask from 'webtask-tools'; | |
import * as Express from 'express'; | |
const app : Express.Application = Express(); | |
app.get('/', function index (req: Express.Request, res: Express.Response) : void { | |
res.json({ | |
"hello": "world" | |
}); | |
}); | |
export default Webtask.fromExpress(app); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment