Skip to content

Commit

Permalink
refac(webpack): remove obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuperZee committed May 10, 2024
1 parent 8e4a6ff commit cb08c2e
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,6 @@ import path from 'path';

const htmlGraphicsDeclarationsPath = path.resolve(__dirname, 'src/components/CodeEditor/declarations');

/**
* @type {import("@grafana/toolkit/src/config").CustomWebpackConfigurationGetter}
*/
module.exports.getWebpackConfig = (config, options) => {
// Don't compile the declarations with babel (removes the types).
config.module.rules[0].exclude = [/node_modules/, htmlGraphicsDeclarationsPath];

// Compile the declarations using asset/resource
config.module.rules.push({
test: /\.d\.ts?$/,
type: 'asset/resource',
resource: [htmlGraphicsDeclarationsPath],
generator: {
publicPath: `public/plugins/${pluginJson.id}/declarations/`,
outputPath: 'declarations/',
filename: '[hash].d.ts',
},
});

return config;
};

const config = async (env): Promise<Configuration> => {
const baseConfig = await grafanaConfig(env);

Expand Down

0 comments on commit cb08c2e

Please sign in to comment.