Skip to content

Commit

Permalink
adds a webpack config for grafana panel (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
petethepig authored Sep 8, 2021
1 parent 44d58e0 commit cd50bfe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ build: ## Builds the binary
build-release: embedded-assets ## Builds the release build
EXTRA_GO_TAGS=,embedassets $(MAKE) build

.PHONY: build-panel
build-panel:
NODE_ENV=production $(shell yarn bin webpack) --config scripts/webpack/webpack.panel.js

.PHONY: build-rust-dependencies
build-rust-dependencies:
ifeq ("$(OS)", "Linux")
Expand Down
1 change: 0 additions & 1 deletion scripts/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ module.exports = {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
Expand Down
21 changes: 21 additions & 0 deletions scripts/webpack/webpack.panel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { merge } = require("webpack-merge");

const prod = require("./webpack.prod.js");
const path = require("path");

module.exports = merge(prod, {
entry: {
flamegraphComponent: "./webapp/javascript/components/FlameGraph/FlameGraphComponent/index.jsx",
},

output: {
publicPath: "",
path: path.resolve(__dirname, "../../webapp/public/assets"),
filename: "[name].js",
clean: true,

library: "pyroscope",
libraryTarget: 'umd',
umdNamedDefine: true
},
});

0 comments on commit cd50bfe

Please sign in to comment.