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`.
|