From be696dc0cefe2cdb7afcaf1e55fd93befc3857f5 Mon Sep 17 00:00:00 2001 From: "voraton.l" Date: Thu, 31 Mar 2022 13:42:31 +0700 Subject: [PATCH] fix: Fix Code Blocker Output --- README.md | 2 +- package.json | 2 +- rollup.config.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index be5d73e..a773532 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ yarn add source-replacement Attach `source-replacement/build/executors/source-replacement` on the script tag in `` or mark it as `async type=module` -In your source import `source-replacement/build/executors/code-blocker` to prevent executing your source during the process of replacement +In your source import `source-replacement/build/code-blocker.js` to prevent executing your source during the process of replacement #### On your browser diff --git a/package.json b/package.json index 6166764..b9734ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "source-replacement", - "version": "2.0.0", + "version": "2.0.1", "types": "build", "deploy": "build", "main": "build/index.js", diff --git a/rollup.config.js b/rollup.config.js index 86457e7..c7d310b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -28,8 +28,9 @@ export default [ { input: 'src/executors/code-blocker/index.ts', output: { - dir: config.deploy, + file: path.resolve(config.deploy, 'code-blocker.js'), format: 'cjs', + sourcemap: true, }, plugins: sharedPlugins }, @@ -39,6 +40,7 @@ export default [ dir: config.deploy, format: 'umd', name: 'SourceReplacement', + sourcemap: true, }, plugins: sharedPlugins, },