File: README.md

package info (click to toggle)
node-ts-loader 9.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,888 kB
  • sloc: javascript: 74,612; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
# sourceMapsShouldConsiderInputSourceMap

This test represents a typical Vue project which is configured to compile using the [vue-loader](https://github.com/vuejs/vue-loader) webpack loader.
In this test we expect that `ts-loader` is considering the input source map which is generated by the `vue-loader`.

## Background Information

A Vue single file component (SFC) contains different parts of the component: the HTML template, the component's script (can be TypeScript) and sometimes CSS.
The `vue-loader` is extracting the different parts of those SFCs and "sends" the different parts back to webpack together with a appropriate source map.
Webpack then forwards those parts to the each different loaders that are next in the loader chain, which in the case for the script part is the `ts-loader`.
`ts-loader` receives the isolated TypeScript code together with a source map and then further compiles the TypeScript code with the `tsc` and maps the newly generated source map to the input source map from `vue-loader`.