I'm working on a pure frontend project using VS Code. I have a folder for typescript and another one for sass. I'm compiling those with Gulp in separate folders for js and css.
I faced a problem when I tried to use var something = require('some-node-module');
and got an error both in typescript and browser console. I added @types for this but it didn't worked as I still got an error in browser console. I searched more and found this question, I understood what the problem is and I used Browserify from there. Now typescript is compiled without errors and I have to make a bundle everytime I change something. Is there anything I can do to get rid of Browserify and still be able to use require() in typescript. As this is my first pure frontend project I want to keep it simple and clean, not to use a lot of plugins/modules to make it work.
My tsconfig.json:
{
"files": [
"ts/main.ts"
],
"compilerOptions": {
"noImplicitAny": true,
"target": "es5",
"outDir": "js"
}
}
Is there any way I can use types without the need to install more node modules to make it work?