TypeScript support
schickling opened this issue · 2 comments
schickling commented
graphpack
looks awesome. Would be great if it would work out-of-the-box with TypeScript! 💪
nanot1m commented
I think it is possible just to add babel typescript preset, and everything should work
rjoydip-zz commented
I have done this through webpack by following steps.
- Installed
ts-loader
andtypescript
- Created tsconfig.json and paste below code.
{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "node",
"allowJs": true,
"noEmit": false,
"strict": true,
"isolatedModules": true,
"esModuleInterop": true
},
"include": [
"src"
]
}
- Created graphpack.config.js and pasted below code over there
config.module.rules.push({
test: /\.tsx?$/,
loader: 'ts-loader',
});
config.resolve = {
extensions: ['.ts', '.tsx', '.js'],
};
Also, I configured it through Babel. Here are the steps https://github.com/rjoydip/graphpack-ts-support#through-babel