Skip to content

Instantly share code, notes, and snippets.

@johnmarinelli
Last active March 10, 2018 10:17
Show Gist options
  • Save johnmarinelli/57a10e966f50a6db1509aa4858c5e71d to your computer and use it in GitHub Desktop.
Save johnmarinelli/57a10e966f50a6db1509aa4858c5e71d to your computer and use it in GitHub Desktop.
ts => js
import axios from 'axios'
export default class WikiArtClient {
...
}
{
"compilerOptions": {
"outDir": "./dist/",
"lib": ["es2015"],
"module": "es6",
"target": "es5",
"jsx": "react",
"allowJs": true,
"typeRoots": [
"node_modules/@types"
],
"allowSyntheticDefaultImports": true
}
}
const path = require('path')
module.exports = {
entry: './src/index.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.tsx?$/,
enforce: 'pre',
loader: 'tslint-loader'
}
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'wikiart-client.js',
path: path.resolve(__dirname, 'dist'),
},
watch: true,
target: 'node'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment