Chore: Revert externalization of the tslib so it gets bundled with plugins. (#43556)

* Revert externalization of the tslib so it gets bundled with the plugins.

* Adding pnp-webpack-plugin to properly resolve dependencies in nested plugins.

* added dependency on lodash.
This commit is contained in:
Marcus Andersson
2021-12-30 08:53:42 +01:00
committed by GitHub
parent f17fb76b5e
commit efd7a12686
5 changed files with 30 additions and 3 deletions

View File

@@ -16,7 +16,10 @@
"author": "Grafana Labs",
"devDependencies": {
"@types/jest": "26.0.15",
"@types/lodash": "4.14.149",
"@types/react": "17.0.30",
"lodash": "4.17.21",
"pnp-webpack-plugin": "^1.7.0",
"ts-loader": "8.0.11",
"webpack": "5.58.1"
},

View File

@@ -0,0 +1,15 @@
const { merge } = require('lodash');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
module.exports = {
getWebpackConfig: (baseConfig) => {
return merge(baseConfig, {
resolve: {
plugins: [PnpWebpackPlugin],
},
resolveLoader: {
plugins: [PnpWebpackPlugin.moduleLoader(module)],
},
});
},
};