rollup-plugin-replace-shebang 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs CHANGED
@@ -33,9 +33,10 @@ function replaceStringPlugin(options = {}) {
33
33
  renderChunk(code, chunk, {
34
34
  sourcemap
35
35
  }) {
36
+ const moduleID = chunk.facadeModuleId.replace(/\?.+$/, '');
36
37
  const {
37
38
  shebang
38
- } = contextMap.get(chunk.facadeModuleId) || {};
39
+ } = contextMap.get(moduleID) || {};
39
40
  if (!shebang) return null;
40
41
 
41
42
  if (options.skipBackslash) {
package/lib/index.js CHANGED
@@ -39,9 +39,10 @@ function replaceStringPlugin(options = {}) {
39
39
  renderChunk(code, chunk, {
40
40
  sourcemap
41
41
  }) {
42
+ const moduleID = chunk.facadeModuleId.replace(/\?.+$/, '');
42
43
  const {
43
44
  shebang
44
- } = contextMap.get(chunk.facadeModuleId) || {};
45
+ } = contextMap.get(moduleID) || {};
45
46
  if (!shebang) return null;
46
47
 
47
48
  if (options.skipBackslash) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rollup-plugin-replace-shebang",
3
3
  "description": "一个自动替换shebang的rollup插件",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",
7
7
  "typings": "typings/index.d.ts",