@multiplatform.one/vite-plugin-webext 6.4.2 → 6.6.0
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/lib/index.cjs +2 -1
- package/lib/index.mjs +2 -1
- package/package.json +2 -2
- package/src/index.ts +6 -0
- package/types/index.d.ts.map +1 -1
package/lib/index.cjs
CHANGED
|
@@ -247,7 +247,8 @@ async function createWebextContentConfig(options) {
|
|
|
247
247
|
lib: {
|
|
248
248
|
entry: node_path.default.join(options.targetDir, "content_scripts/index.tsx"),
|
|
249
249
|
name: options.packageInfo.name,
|
|
250
|
-
formats: ["iife"]
|
|
250
|
+
formats: ["iife"],
|
|
251
|
+
cssFileName: "webext"
|
|
251
252
|
},
|
|
252
253
|
rollupOptions: { output: {
|
|
253
254
|
entryFileNames: "index.global.js",
|
package/lib/index.mjs
CHANGED
|
@@ -216,7 +216,8 @@ async function createWebextContentConfig(options) {
|
|
|
216
216
|
lib: {
|
|
217
217
|
entry: path.join(options.targetDir, "content_scripts/index.tsx"),
|
|
218
218
|
name: options.packageInfo.name,
|
|
219
|
-
formats: ["iife"]
|
|
219
|
+
formats: ["iife"],
|
|
220
|
+
cssFileName: "webext"
|
|
220
221
|
},
|
|
221
222
|
rollupOptions: { output: {
|
|
222
223
|
entryFileNames: "index.global.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/vite-plugin-webext",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "Vite config factories for building a browser web extension (MV3 views, background service worker, content scripts) as a target of a multiplatform.one One app — workspace source aliases, the one-server-only browser stub, Tamagui wiring, and the manifest/dev-reload prepare pipeline.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"browser-extension",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"chokidar": "^5.0.0",
|
|
50
|
-
"@multiplatform.one/utils": "6.
|
|
50
|
+
"@multiplatform.one/utils": "6.6.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@tamagui/vite-plugin": "2.0.0-rc.41",
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
// <stagingDir>/dist/views/<view>/index.html (popup/options/sidepanel/…)
|
|
9
9
|
// <stagingDir>/dist/background/index.mjs (service worker / bg script)
|
|
10
10
|
// <stagingDir>/dist/contentScripts/index.global.js
|
|
11
|
+
// <stagingDir>/dist/contentScripts/webext.css (web-accessible resource)
|
|
11
12
|
//
|
|
12
13
|
// Three vite builds cover the three JS worlds (DOM views, worker, injected
|
|
13
14
|
// content script); `runWebextPrepare` writes the manifest and the dev-mode
|
|
@@ -287,6 +288,11 @@ export async function createWebextContentConfig(options: WebextTargetOptions): P
|
|
|
287
288
|
entry: path.join(options.targetDir, "content_scripts/index.tsx"),
|
|
288
289
|
name: options.packageInfo.name,
|
|
289
290
|
formats: ["iife"],
|
|
291
|
+
// Without this, Vite names the extracted stylesheet after the nearest
|
|
292
|
+
// package.json — so the file tracked whichever app hosts the target
|
|
293
|
+
// (`one.css` since webext folded into apps/one) while the manifest
|
|
294
|
+
// declares a stable target-owned name.
|
|
295
|
+
cssFileName: "webext",
|
|
290
296
|
},
|
|
291
297
|
rollupOptions: {
|
|
292
298
|
output: {
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE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