diff --git a/package.json b/package.json index 689b1d59..5cf268e0 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "yarn run build:ts && yarn run gen:locale && yarn run build:extension", "gen:locale": "yarn run ts-node scripts/generateLocale.ts", - "build:ts": "yarn run clean:ts && rollup -c && sed -i '/setTimeout/d' dist/thirdparty/prismjs.js && sed -i 's/var\\ /let\\ /g' dist/{extension,prefs}.js", + "build:ts": "yarn run clean:ts && rollup -c --failAfterWarnings && sed -i '/setTimeout/d' dist/thirdparty/prismjs.js && sed -i 's/var\\ /let\\ /g' dist/{extension,prefs}.js", "clean:ts": "rm -rf ./dist", "build:extension": "yarn run build:schema", "build:schema": "yarn run clean:schema && glib-compile-schemas ./resources/schemas --targetdir=./dist/schemas/", diff --git a/rollup.config.mjs b/rollup.config.mjs index ea8c1866..360a0ebb 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -97,6 +97,8 @@ const thirdParty = [ 'highlight.js/lib/languages/yaml', ]; +const gjsModules = [...Object.keys(importsGeneral), ...Object.keys(importsPrefs)]; + const GlobalEntries = {}; const thirdPartyBuild = thirdParty.map((pkg) => { @@ -143,7 +145,7 @@ const builds = [ constBindings: true, }, }, - external: thirdParty, + external: [...thirdParty, ...gjsModules], plugins: [ commonjs(), nodeResolve({ @@ -184,7 +186,7 @@ const builds = [ treeshake: { moduleSideEffects: 'no-external', }, - external: thirdParty, + external: [...thirdParty, ...gjsModules], plugins: [ commonjs(), nodeResolve({