mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Toolkit: Fix compilation loop when watching plugins for changes (#58167)
* fix(toolkit): ignore node_modules and dist directories when watching for changes to plugin * fix(toolkit): move watchOptions.ignored config to pluginDev watch call
This commit is contained in:
parent
75c9350a5a
commit
ce50400740
@ -22,9 +22,8 @@ export const bundlePlugin = async ({ watch, production, preserveConsole }: Plugi
|
||||
const webpackPromise = new Promise<void>((resolve, reject) => {
|
||||
if (watch) {
|
||||
console.log('Started watching plugin for changes...');
|
||||
compiler.watch({}, (err, stats) => {});
|
||||
compiler.watch({ ignored: ['**/node_modules', '**/dist'] }, (err, stats) => {});
|
||||
|
||||
// @ts-ignore
|
||||
compiler.hooks.invalid.tap('invalid', () => {
|
||||
clearConsole();
|
||||
console.log('Compiling...');
|
||||
|
@ -162,7 +162,6 @@ const getBaseWebpackConfig: WebpackConfigurationGetter = async (options) => {
|
||||
libraryTarget: 'amd',
|
||||
publicPath: '/',
|
||||
},
|
||||
|
||||
performance: { hints: false },
|
||||
externals: [
|
||||
'lodash',
|
||||
|
Loading…
Reference in New Issue
Block a user