MCPcopy Index your code
hub / github.com/andywer/webpack-blocks / typescript

Function typescript

packages/typescript/index.js:15–42  ·  view source on GitHub ↗

* @param {object} [options] See https://github.com/s-panferov/awesome-typescript-loader#loader-options * @return {Function}

(options = {})

Source from the content-addressed store, hash-verified

13 * @return {Function}
14 */
15function typescript(options = {}) {
16 return (context, util) =>
17 util.merge({
18 resolve: {
19 extensions: ['.ts', '.tsx']
20 },
21 module: {
22 rules: [
23 Object.assign(
24 {
25 test: /\.(ts|tsx)$/,
26 use: [
27 {
28 loader: 'awesome-typescript-loader',
29 options
30 }
31 ]
32 },
33 context.match
34 )
35 ]
36 },
37 plugins: [
38 new CheckerPlugin(),
39 new TsConfigPathsPlugin({ tsconfig: options.configFileName, compiler: options.compiler }) // This hooks into webpacks module resolution, configure via tsconfig.json
40 ]
41 })
42}

Callers 2

webpack.config.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…