You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/guides/typescript.mdx
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,42 @@ Now lets change the import of `lodash` in our `./index.ts` due to the fact that
115
115
116
116
T> To make imports do this by default and keep `import _ from 'lodash';` syntax in TypeScript, set `"allowSyntheticDefaultImports" : true` and `"esModuleInterop" : true` in your **tsconfig.json** file. This is related to TypeScript configuration and mentioned in our guide only for your information.
117
117
118
+
## Ways to Use TypeScript in `webpack.config.js`
119
+
120
+
There are 5 ways to use TypeScript in `webpack.config.js`:
121
+
122
+
1.**Using webpack with TypeScript config:**
123
+
124
+
```bash
125
+
webpack -c ./webpack.config.ts
126
+
```
127
+
128
+
(Not all things are supported due to limitations of `rechoir` and `interpret`.)
@@ -129,6 +165,8 @@ Note that if you're already using [`babel-loader`](https://github.com/babel/babe
129
165
130
166
To learn more about source maps, see the [development guide](/guides/development).
131
167
168
+
To learn more about source maps, see the [development guide](/guides/development).
169
+
132
170
To enable source maps, we must configure TypeScript to output inline source maps to our compiled JavaScript files. The following line must be added to our TypeScript configuration:
0 commit comments