* build(webpack): add tsconfig.json for Node strip-types compliance
* build(webpack): extract shared esbuild options to esbuild.ts
* build(webpack): add package.json to declare ESM module type
* build(webpack): convert sass.rule to TypeScript
* build(webpack): convert CorsWorkerPlugin to TypeScript
* build(webpack): convert FeatureFlaggedSriPlugin to TypeScript
* build(webpack): convert webpack.common to TypeScript, add theme entries
* build(webpack): convert webpack.dev to TypeScript, remove esbuild duplication
* build(webpack): convert webpack.prod to TypeScript, remove esbuild duplication
* build(webpack): fix TypeScript types in webpack.prod transform callback
* build(webpack): convert webpack.stats to TypeScript
* build(webpack): update scripts to use TypeScript webpack configs
* build(webpack): simplify env-util to use import.meta.dirname directly
* build(webpack): tidy up plugins
* build(webpack): move rules for ts and sass into single module
* build(webpack): consolidate shared config into common, move splitChunks to prod
- Move MiniCssExtractPlugin, esbuildRule and sassRule into common so both
dev and prod configs share them without duplication
- Move splitChunks/runtimeChunk optimisation to webpack.prod only (not
needed in dev)
- Use require() for SubresourceIntegrityPlugin to work around broken ESM
build (waysact/webpack-subresource-integrity#236)
- Refactor conditional plugin logic in dev from ternary to if-blocks
* build(webpack): remove dead import and clarify webpack destructure pattern
- Remove unused MiniCssExtractPlugin import from webpack.prod (moved to common)
- Add comment explaining why DefinePlugin/EnvironmentPlugin are destructured
from the default webpack import rather than using named ESM imports
* style(webpack): reorder consts
* chore(env-util): fix up env-util and webpack configs so tests continue to run
* refactor(env-util): accept grafanaRoot param instead of relying on __dirname
Removes the global.__dirname mutation hack in webpack.common.ts by making
the grafana root path an explicit argument to getEnvConfig. Each caller
resolves its own root and passes it in, removing the implicit path-depth
contract and the CJS/ESM compatibility workaround.
* build(webpack): remove unused angular chunk group
* refactor(frontend): rename assetSriChecks and generate go
* feat(frontend-service): pass sri checks feature flag to frontend html template
* feat(backend): pass asset sri check feature flag to st frontend template
* build(webpack): use global __grafanaAssetSriChecksEnabled var to control sri checks in async loading
* chore(frontend-service): add assetSriChecks to goff-flags.yaml
* docs(webpack): add more info on what and why to featureflaggedsriplugin
* feat(featuremgmt): introduce feature toggle for enabling sri checks
* feat(frontend): use assetSriChecks feature toggle to inject integrity hash into script tags
* chore(webpack): align sri algorithms across dev and prod builds
* docs(featuremgmt): update assetSriChecks to pass CI
* docs(featuremgmt): fix more spelling complaints with assetSriChecks
* Add crossorigin attribute
* chore(webpack): add subresource-integrity plugin
* build(webpack): wrap webpack jsonp loader integrity checks in feature flag checks
* revert(index.html): remove crossorigin attribute if assertSriChecks is disabled
---------
Co-authored-by: Kristian Bremberg <kristian.bremberg@grafana.com>
* build(webpack): move CopyUniconsPlugin into own file
* chore(webpack): delete unused blobUrl and compile loaders
* build(webpack): prefer contenthash over fullhash for longer caching
* build(webpack): set optimization.moduleIds named only in dev
* build(webpack): introduce HTMLWebpackCSSChunks so templates can access theme css by name
* feat: inject css files with contenthash in html templates
* revert(error-template): remove ContentDeliveryURL from CSS href
* refactor(index-template): update grafanaBootData.themePaths
* chore(webpack): add typescript annotations for CopyUniconsPlugin
* Fix: make webpack pickup workers written in TS
* Add comlink to dependencies
* Temporary fix: copy paste `toDataQueryError` from @grafana/runtime to avoid web dependencies
* Implemented comlink-based centrifuge worker & worker proxy
* Temporary fix: implement comlink transferHandlers for subscriptions and streamingdataframes
* Move liveTimer filtering from CentrifugeService into GrafanaLiveService
* Switch from CentrifugeService to CentrifugeServiceWorkerProxy in GrafanaLive
* Naming fix
* Refactor: move liveTimer-based data filtering from GrafanaLiveService to CentrifugeServiceWorker
* observe dataStream on an async scheduler
* Fix: - Unsubscribe is now propagated from the main thread to the worker, - improve worker&workerProxy types
* Fix: Prettify types
* Fix: Add error & complete observers
* Docs: Add comment explaining the `subscriberTransferHandler`
* Fix: Replace `StreamingDataFrameHandler` with explicitly converting StreamingDataFrame to a DataFrameDTO
* Refactor: move liveTimer filtering to service.ts to make it easy to implement a `live-service-web-worker` feature flag
* Feat: add `live-service-web-worker` feature flag
* Fix: extract toDataQueryError.ts to a separate file within `@grafana-runtime` to avoid having a dependency from webworker to the whole package (@grafana-runtime/index.ts)
* Update public/app/features/dashboard/dashgrid/liveTimer.ts
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Fix: fixed default import class in worker file
* Fix: cast worker as Endpoint
* Migrate from worker-loader to webpack native worker support v1 - broken prod build
* Fix: Use custom path in HtmlWebpackPlugin
* Fix: Loading workers from CDNs
* Fix: Avoid issues with jest ESM support by mocking `createWorker` files
* Fix: move the custom mockWorker rendering layout to `test/mocks`
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>