From e90bac1d32e855b1e374448ef4989a57dcc8c965 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Tue, 22 Oct 2019 16:04:40 +0800 Subject: [PATCH] feat:add config to generate map file --- demo/rollup.config.js | 1 + demo/tsconfig.json | 5 ++--- doric-cli/contents/_rollup.config.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/demo/rollup.config.js b/demo/rollup.config.js index 3e8b4c13..e267034d 100644 --- a/demo/rollup.config.js +++ b/demo/rollup.config.js @@ -8,6 +8,7 @@ export default bundles.map(bundle => { output: { format: "cjs", file: `bundle/${bundle}.js`, + sourcemap: true, }, plugins: [ resolve({ jsnext: true, main: true }), diff --git a/demo/tsconfig.json b/demo/tsconfig.json index d511f6a0..4d880db4 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "experimentalDecorators": true, /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ "target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ @@ -11,7 +10,7 @@ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ // "declaration": true, /* Generates corresponding '.d.ts' file. */ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ + "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "build/", /* Redirect output structure to the directory. */ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ @@ -53,7 +52,7 @@ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */ }, "include": [ diff --git a/doric-cli/contents/_rollup.config.js b/doric-cli/contents/_rollup.config.js index 3e8b4c13..e267034d 100644 --- a/doric-cli/contents/_rollup.config.js +++ b/doric-cli/contents/_rollup.config.js @@ -8,6 +8,7 @@ export default bundles.map(bundle => { output: { format: "cjs", file: `bundle/${bundle}.js`, + sourcemap: true, }, plugins: [ resolve({ jsnext: true, main: true }),