Choose one: a 馃悰 bug report
package.json
{
"name": "vue-ts-parcel",
"version": "1.0.0",
"description": "",
"scripts": {
"dev": "rm -rf .cache && rm -rf dist && parcel src/index.html",
"build": "parcel build src/index.html"
},
"author": "",
"license": "ISC",
"dependencies": {
"vue": "^2.5.16",
"vue-class-component": "^6.2.0",
"vue-property-decorator": "^6.0.0",
"vue-template-compiler": "^2.5.16"
},
"devDependencies": {
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"parcel-bundler": "^1.6.2",
"parcel-plugin-typescript": "^0.7.0",
"parcel-plugin-vue": "^1.5.0",
"tslint": "^5.9.1",
"typescript": "^2.6.2",
"typescript-eslint-parser": "^14.0.0"
}
}
tsconfig.json
{
"compilerOptions": {
"module": "es2015",
"noImplicitAny": true,
"removeComments": true,
"moduleResolution": "node",
"preserveConstEnums": true,
"sourceMap": true,
"strict": true,
"target": "es5",
"experimentalDecorators": true
},
"include": [
"./src/**/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
],
"parcelTsPluginOptions": {
// If true type-checking is disabled
"transpileOnly": false
}
}
With the latest version of parcel 1.6.2 , I got parcel index.html working with the js and map file generated in dist. I was expecting the source map working as expected in browser, but it did not.
The comment pointing to the map file was missing in generated bundle js file. But it was not missing in another project without typescript.
Later I found the source code here removes the comment of "source map URL" for ts asset, and I want to know why.
I want to make source map working with typescript. Is this behavior intended? Is this a bug? And how can I get it works?
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.6.2
| Node | 8.9.3
| Yarn | 1.3.2
| Operating System | Mac OSX
Parcel takes care of adding source map URL, so we remove it in the typescript parser.
However this is a parcel-plugin-typescript and unrelated to parcel. (The parser used in parcel is ignored and instead the one from parcel-plugin-typescript is used in your case)
@DeMoorJasper parcel-plugin-vue was responsible, just so you know as you're working on the Vue support
@fathyb Thanks for letting me know, I'll make sure sourcemaps work properly in the official vue support
Most helpful comment
@DeMoorJasper
parcel-plugin-vuewas responsible, just so you know as you're working on the Vue support