@snowpack/plugin-webpack: Typescript project with 'target' as 'es5' #1569
-
G'day all. I just started playing around with Snowpack for a TypeScript project. I am not an expert in either TypeScript or Webpack for that matter, so pardon me should I sound like a n00b. So, here are the steps that I followed:
Everything runs fine and I am able to create Production build using 'package.json' -> 'scripts' -> 'build' command.
If it helps, here is my 'tsconfig.json':
and here's my 'snowpack.config.js':
Any ideas as to what I could be doing wrong? I tried changing 'target' and 'module' in 'tsconfig.json' to 'ES5', but to no avail. Thank you very much in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If in the event of someone else getting stuck on this issue again in the future, I found a solution to address this problem: browserslist.
Webpack will pick it up and will update its Hope it helps someone in the future. |
Beta Was this translation helpful? Give feedback.
-
Thanks it works! |
Beta Was this translation helpful? Give feedback.
If in the event of someone else getting stuck on this issue again in the future, I found a solution to address this problem: browserslist.
You could just add this to your package.json:
Webpack will pick it up and will update its
'babel-loader' -> 'targets'
with whatever settings you put in the'browserslist'
node.Hope it helps someone in the future.