Skip to content

Commit efd0112

Browse files
committed
Revert "fix build with iife"
This reverts commit 4bf6768.
1 parent faa3cd0 commit efd0112

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Grants } from './types.js'
22

3-
export const styleTemplate = 'console.warn("__GM_STYLE__")'
3+
export const styleTemplate = 'console.warn("__STYLE__")'
44
export const regexpScripts = new RegExp(/\.(t|j)sx?$/)
55
export const regexpStyles = new RegExp(/\.(s[ac]|c|le)ss$/)
66

src/index.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ import { server } from 'websocket'
1212
import type { connection } from 'websocket'
1313
import { Banner } from './banner.js'
1414
import { userConfig } from './config.js'
15-
import {
16-
grants,
17-
regexpScripts,
18-
regexpStyles,
19-
styleTemplate
20-
} from './constants.js'
15+
import { grants, regexpScripts, regexpStyles, styleTemplate } from './constants.js'
2116
import css from './css.js'
2217
import { defineGrants, removeDuplicates, transform } from './helpers.js'
2318
import type { UserscriptPluginConfig } from './types.js'
@@ -86,7 +81,7 @@ export default function UserscriptPlugin(
8681
code = await css.add(src, path)
8782
}
8883

89-
if (path.includes(config.entry) && !src.includes(styleTemplate)) {
84+
if (path.includes(config.entry)) {
9085
code = src + styleTemplate
9186
}
9287

0 commit comments

Comments
 (0)