From 81ce9833a59756b85c0528cbc76dfb4b272d651c Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Mon, 9 Dec 2019 03:58:43 +0800 Subject: Add rollup sourcemap and fix launch.json --- editors/code/package-lock.json | 53 ++++++++++++++++++++++++++++++++++++++++++ editors/code/package.json | 1 + editors/code/rollup.config.js | 3 +++ 3 files changed, 57 insertions(+) (limited to 'editors/code') diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index 4e8ed7048..b1baa437e 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json @@ -131,6 +131,12 @@ "sprintf-js": "~1.0.2" } }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, "azure-devops-node-api": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz", @@ -324,6 +330,12 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1084,6 +1096,12 @@ "path-parse": "^1.0.6" } }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -1158,6 +1176,16 @@ } } }, + "rollup-plugin-sourcemaps": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz", + "integrity": "sha1-YhJaqUCHqt97g+9N+vYptHMTXoc=", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.0.1", + "source-map-resolve": "^0.5.0" + } + }, "rollup-plugin-typescript": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz", @@ -1241,6 +1269,25 @@ } } }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, "sourcemap-codec": { "version": "1.4.6", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", @@ -1409,6 +1456,12 @@ "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", "dev": true }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, "url-join": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", diff --git a/editors/code/package.json b/editors/code/package.json index 84a45945f..ae2049c57 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -48,6 +48,7 @@ "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-typescript": "^1.0.1", + "rollup-plugin-sourcemaps": "^0.4.2", "shx": "^0.3.1", "tslint": "^5.20.1", "tslint-config-prettier": "^1.18.0", diff --git a/editors/code/rollup.config.js b/editors/code/rollup.config.js index a023b8c3f..1b222bbe7 100644 --- a/editors/code/rollup.config.js +++ b/editors/code/rollup.config.js @@ -1,12 +1,14 @@ import typescript from 'rollup-plugin-typescript'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; +import sourcemaps from 'rollup-plugin-sourcemaps' import nodeBuiltins from 'builtin-modules'; export default { input: './src/extension.ts', plugins: [ typescript(), + sourcemaps(), resolve(), commonjs({ namedExports: { @@ -22,6 +24,7 @@ export default { ], output: { file: './bundle/extension.js', + sourcemap: true, format: 'cjs', } }; -- cgit v1.2.3