CS Config Not evaluated?

export const config: PlasmoCSConfig = {
matches:
process.env.NODE_ENV === "production"
? ["<all_urls>"]
: ["http://localhost:3000/*"]
}
export const config: PlasmoCSConfig = {
matches:
process.env.NODE_ENV === "production"
? ["<all_urls>"]
: ["http://localhost:3000/*"]
}
extension:dev: :red_circle: ERROR | Invalid Web Extension manifest
extension:dev: :yellow_circle: 20 | Missing property matches
extension:dev: :red_circle: ERROR | Invalid Web Extension manifest
extension:dev: :yellow_circle: 20 | Missing property matches
why is that? when I declare the value of matches outside of the config it ignores the config (content script is loaded on every url ...)
1 Reply
lab
labOP•2y ago
ref: https://discord.com/channels/946290204443025438/946290204904390690/1088208573630255145 @DennisKo the config is not evaluated atm - the config that get passed down to the manifest must be static. You may use the env inside the config like so:
matches: ["$PLASMO_PUBLIC_DEV_URL"]
matches: ["$PLASMO_PUBLIC_DEV_URL"]
Want results from more Discord servers?
Add your server