Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions injected/scripts/utils/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { commentPlugin } from './comment-plugin.js';
const ROOT = join(cwd(import.meta.url), '..', '..');
const DEBUG = false;

const prefixMessage = '/*! © DuckDuckGo ContentScopeScripts protections https://github.com/duckduckgo/content-scope-scripts/ */';
const prefixMessage = '/*! © DuckDuckGo ContentScopeScripts $INJECT_NAME$ https://github.com/duckduckgo/content-scope-scripts/ */';

/**
* @param {object} params
Expand All @@ -30,6 +30,8 @@ export async function bundle(params) {
const loadFeaturesPlugin = loadFeatures(platform, featureNames);
// The code is using a global, that we define here which means once tree shaken we get a browser specific output.

const outputPrefixName = prefixMessage.replace('$INJECT_NAME$', platform);

/** @type {import("esbuild").BuildOptions} */
const buildOptions = {
entryPoints: [scriptPath],
Expand All @@ -52,7 +54,7 @@ export async function bundle(params) {
},
plugins: [loadFeaturesPlugin, commentPlugin()],
banner: {
js: prefixMessage,
js: outputPrefixName,
},
};

Expand Down
Loading