Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for using different xtbuild config for firefox and chrome #196

Open
danny-does-stuff opened this issue Nov 11, 2022 · 1 comment

Comments

@danny-does-stuff
Copy link

Is your feature request related to a problem? Please describe.
I would like to be able to define different behavior for a chrome release vs a firefox release. For example, I would like to be able to have a different release name for my chrome and firefox releases.

Describe the solution you'd like
I would like to be able to add a "firefox" and/or "chrome" key to the .xtbuild.json file or xt-build config in package.json with different values for the configuration options. My config would then look like this

{
	"manifest": "./src/extension/manifest.json",
	"js_bundles": [
		{
			"src": "./src/extension/background.js",
			"name": "background",
		},
		{
			"src": [
				"./src/extension/file1",
				"./src/extension/file2",
				"./src/extension/file3"
			],
			"name": "bundle2",
		}
	],
	"firefox": {
		"release_name": "release_firefox"
	}
}

which would change the release name when releasing for firefox

Describe alternatives you've considered
Another way to achieve this would be to allow overriding config options on the command line, e.g. xt-build -e prod -p firefox --release_name=release_firefox. I would imagine that this solution would be harder to implement, and less robust

Thanks for the awesome project!

@galori
Copy link

galori commented Sep 17, 2024

Just ran into the same issue - I managed to get this working by adding a file with overrides like

xt-build-firefox.json:

{
  "release_name": "release-firefox"
}

and then building with

 npx xt-build -e prod -p firefox -c xt-build-firefox.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants