Last active
March 10, 2018 10:17
-
-
Save johnmarinelli/57a10e966f50a6db1509aa4858c5e71d to your computer and use it in GitHub Desktop.
ts => js
This file contains hidden or 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 axios from 'axios' | |
export default class WikiArtClient { | |
... | |
} |
This file contains hidden or 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": { | |
"outDir": "./dist/", | |
"lib": ["es2015"], | |
"module": "es6", | |
"target": "es5", | |
"jsx": "react", | |
"allowJs": true, | |
"typeRoots": [ | |
"node_modules/@types" | |
], | |
"allowSyntheticDefaultImports": true | |
} | |
} |
This file contains hidden or 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
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