-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support hash and query properties in manifest HTML filenames
closes #90
- Loading branch information
Showing
13 changed files
with
565 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
248 changes: 248 additions & 0 deletions
248
test/manifest/__snapshots__/htmlUrlProperties.v2.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
// Vitest Snapshot v1 | ||
|
||
exports[`htmlUrlProperties - Manifest V2 1`] = ` | ||
[ | ||
{ | ||
"code": "function log(message) { | ||
console.log(message); | ||
} | ||
export { | ||
log as l | ||
}; | ||
", | ||
"dynamicImports": [], | ||
"exports": [ | ||
"l", | ||
], | ||
"facadeModuleId": null, | ||
"fileName": "assets/log.js", | ||
"implicitlyLoadedBefore": [], | ||
"importedBindings": {}, | ||
"imports": [], | ||
"isDynamicEntry": false, | ||
"isEntry": false, | ||
"isImplicitEntry": false, | ||
"map": null, | ||
"modules": { | ||
"vite-plugin-web-extension/test/manifest/resources/shared/log.js": { | ||
"code": "function log(message) { | ||
console.log(message); | ||
}", | ||
"originalLength": 65, | ||
"removedExports": [], | ||
"renderedExports": [ | ||
"default", | ||
], | ||
"renderedLength": 49, | ||
}, | ||
}, | ||
"name": "log", | ||
"referencedFiles": [], | ||
"type": "chunk", | ||
"viteMetadata": { | ||
"importedAssets": Set {}, | ||
"importedCss": Set {}, | ||
}, | ||
}, | ||
{ | ||
"code": "import { l as log } from \\"../../../../log.js\\"; | ||
log(\\"devtools\\"); | ||
", | ||
"dynamicImports": [], | ||
"exports": [], | ||
"facadeModuleId": "vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/devtools.html", | ||
"fileName": "assets/test/manifest/resources/htmlUrlProperties/devtools.js", | ||
"implicitlyLoadedBefore": [], | ||
"importedBindings": { | ||
"assets/log.js": [ | ||
"l", | ||
], | ||
}, | ||
"imports": [ | ||
"assets/log.js", | ||
], | ||
"isDynamicEntry": false, | ||
"isEntry": true, | ||
"isImplicitEntry": false, | ||
"map": null, | ||
"modules": { | ||
"vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/devtools.html": { | ||
"code": null, | ||
"originalLength": 227, | ||
"removedExports": [], | ||
"renderedExports": [], | ||
"renderedLength": 0, | ||
}, | ||
"vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/devtools.js": { | ||
"code": "log(\\"devtools\\");", | ||
"originalLength": 53, | ||
"removedExports": [], | ||
"renderedExports": [], | ||
"renderedLength": 16, | ||
}, | ||
}, | ||
"name": "test/manifest/resources/htmlUrlProperties/devtools", | ||
"referencedFiles": [], | ||
"type": "chunk", | ||
"viteMetadata": { | ||
"importedAssets": Set {}, | ||
"importedCss": Set {}, | ||
}, | ||
}, | ||
{ | ||
"code": "import { l as log } from \\"../../../../log.js\\"; | ||
log(\\"options\\"); | ||
", | ||
"dynamicImports": [], | ||
"exports": [], | ||
"facadeModuleId": "vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/options.html", | ||
"fileName": "assets/test/manifest/resources/htmlUrlProperties/options.js", | ||
"implicitlyLoadedBefore": [], | ||
"importedBindings": { | ||
"assets/log.js": [ | ||
"l", | ||
], | ||
}, | ||
"imports": [ | ||
"assets/log.js", | ||
], | ||
"isDynamicEntry": false, | ||
"isEntry": true, | ||
"isImplicitEntry": false, | ||
"map": null, | ||
"modules": { | ||
"vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/options.html": { | ||
"code": null, | ||
"originalLength": 226, | ||
"removedExports": [], | ||
"renderedExports": [], | ||
"renderedLength": 0, | ||
}, | ||
"vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/options.js": { | ||
"code": "log(\\"options\\");", | ||
"originalLength": 52, | ||
"removedExports": [], | ||
"renderedExports": [], | ||
"renderedLength": 15, | ||
}, | ||
}, | ||
"name": "test/manifest/resources/htmlUrlProperties/options", | ||
"referencedFiles": [], | ||
"type": "chunk", | ||
"viteMetadata": { | ||
"importedAssets": Set {}, | ||
"importedCss": Set {}, | ||
}, | ||
}, | ||
{ | ||
"code": "import { l as log } from \\"../../../../log.js\\"; | ||
log(\\"popup\\"); | ||
", | ||
"dynamicImports": [], | ||
"exports": [], | ||
"facadeModuleId": "vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/popup.html", | ||
"fileName": "assets/test/manifest/resources/htmlUrlProperties/popup.js", | ||
"implicitlyLoadedBefore": [], | ||
"importedBindings": { | ||
"assets/log.js": [ | ||
"l", | ||
], | ||
}, | ||
"imports": [ | ||
"assets/log.js", | ||
], | ||
"isDynamicEntry": false, | ||
"isEntry": true, | ||
"isImplicitEntry": false, | ||
"map": null, | ||
"modules": { | ||
"vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/popup.html": { | ||
"code": null, | ||
"originalLength": 224, | ||
"removedExports": [], | ||
"renderedExports": [], | ||
"renderedLength": 0, | ||
}, | ||
"vite-plugin-web-extension/test/manifest/resources/htmlUrlProperties/popup.js": { | ||
"code": "log(\\"popup\\");", | ||
"originalLength": 50, | ||
"removedExports": [], | ||
"renderedExports": [], | ||
"renderedLength": 13, | ||
}, | ||
}, | ||
"name": "test/manifest/resources/htmlUrlProperties/popup", | ||
"referencedFiles": [], | ||
"type": "chunk", | ||
"viteMetadata": { | ||
"importedAssets": Set {}, | ||
"importedCss": Set {}, | ||
}, | ||
}, | ||
{ | ||
"fileName": "manifest.json", | ||
"name": undefined, | ||
"source": "{ | ||
\\"version\\": \\"1.0.0\\", | ||
\\"name\\": \\"Manifest Name\\", | ||
\\"manifest_version\\": 2, | ||
\\"browser_action\\": { | ||
\\"default_popup\\": \\"test/manifest/resources/htmlUrlProperties/popup.html#hashValue\\" | ||
}, | ||
\\"devtools_page\\": \\"test/manifest/resources/htmlUrlProperties/devtools.html?query=1\\", | ||
\\"options_ui\\": { | ||
\\"page\\": \\"test/manifest/resources/htmlUrlProperties/options.html?query=1#hashValue\\" | ||
} | ||
}", | ||
"type": "asset", | ||
}, | ||
{ | ||
"fileName": "test/manifest/resources/htmlUrlProperties/devtools.html", | ||
"name": undefined, | ||
"source": "<!DOCTYPE html> | ||
<html lang=\\"en\\"> | ||
<head> | ||
<meta charset=\\"UTF-8\\" /> | ||
<script type=\\"module\\" src=\\"http://example.com/httpModuleScript.js\\"></script> | ||
<script type=\\"module\\" crossorigin src=\\"/assets/test/manifest/resources/htmlUrlProperties/devtools.js\\"></script> | ||
</head> | ||
</html> | ||
", | ||
"type": "asset", | ||
}, | ||
{ | ||
"fileName": "test/manifest/resources/htmlUrlProperties/options.html", | ||
"name": undefined, | ||
"source": "<!DOCTYPE html> | ||
<html lang=\\"en\\"> | ||
<head> | ||
<meta charset=\\"UTF-8\\" /> | ||
<script type=\\"module\\" src=\\"http://example.com/httpModuleScript.js\\"></script> | ||
<script type=\\"module\\" crossorigin src=\\"/assets/test/manifest/resources/htmlUrlProperties/options.js\\"></script> | ||
</head> | ||
</html> | ||
", | ||
"type": "asset", | ||
}, | ||
{ | ||
"fileName": "test/manifest/resources/htmlUrlProperties/popup.html", | ||
"name": undefined, | ||
"source": "<!DOCTYPE html> | ||
<html lang=\\"en\\"> | ||
<head> | ||
<meta charset=\\"UTF-8\\" /> | ||
<script type=\\"module\\" src=\\"http://example.com/httpModuleScript.js\\"></script> | ||
<script type=\\"module\\" crossorigin src=\\"/assets/test/manifest/resources/htmlUrlProperties/popup.js\\"></script> | ||
</head> | ||
</html> | ||
", | ||
"type": "asset", | ||
}, | ||
] | ||
`; |
Oops, something went wrong.