File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed
Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ export async function resolveConfig(
226226 userConfigMetadata : userConfigMetadata ?? { } ,
227227 alias,
228228 experimental : defu ( mergedConfig . experimental , { } ) ,
229+ suppressWarnings : mergedConfig . suppressWarnings ?? [ ] ,
229230 dev : {
230231 server : devServerConfig ,
231232 reloadCommand,
Original file line number Diff line number Diff line change @@ -121,11 +121,14 @@ export async function generateManifest(
121121 // Warn if building for Firefox without data_collection_permissions
122122 if (
123123 wxt . config . browser === 'firefox' &&
124- ! userManifest . browser_specific_settings ?. gecko ?. data_collection_permissions
124+ ! userManifest . browser_specific_settings ?. gecko
125+ ?. data_collection_permissions &&
126+ ! wxt . config . suppressWarnings . includes ( 'firefoxDataCollection' )
125127 ) {
126128 wxt . logger . warn (
127- 'Firefox requires explicit data collection permissions. Consider adding `data_collection_permissions` to your manifest config.\n' +
128- 'For more details, see: https://extensionworkshop.com/documentation/develop/firefox-builtin-data-consent/\n' ,
129+ 'Firefox requires `data_collection_permissions` for new extensions from November 3, 2025. Existing extensions are exempt for now.\n' +
130+ 'For more details, see: https://extensionworkshop.com/documentation/develop/firefox-builtin-data-consent/\n' +
131+ 'To suppress this warning, add `firefoxDataCollection` to `suppressWarnings` in your wxt config.\n' ,
129132 ) ;
130133 }
131134
Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ export const fakeResolvedConfig = fakeObjectCreator<ResolvedConfig>(() => {
305305 hooks : { } ,
306306 vite : ( ) => ( { } ) ,
307307 plugins : [ ] ,
308+ suppressWarnings : [ ] ,
308309 } ;
309310} ) ;
310311
Original file line number Diff line number Diff line change @@ -131,6 +131,17 @@ export interface InlineConfig {
131131 * object or promise.
132132 */
133133 manifest ?: UserManifest | Promise < UserManifest > | UserManifestFn ;
134+ /**
135+ * Suppress specific warnings during the build process.
136+ *
137+ * @example
138+ * ```ts
139+ * export default defineConfig({
140+ * suppressWarnings: ['firefoxDataCollection'],
141+ * })
142+ * ```
143+ */
144+ suppressWarnings ?: string [ ] ;
134145 /**
135146 * Configure browser startup. Options set here can be overridden in a `web-ext.config.ts` file.
136147 */
@@ -1393,6 +1404,10 @@ export interface ResolvedConfig {
13931404 */
13941405 alias : Record < string , string > ;
13951406 experimental : { } ;
1407+ /**
1408+ * List of warning identifiers to suppress during the build process.
1409+ */
1410+ suppressWarnings : string [ ] ;
13961411 dev : {
13971412 /** Only defined during dev command */
13981413 server ?: {
You can’t perform that action at this time.
0 commit comments