Skip to content

Commit 71d9519

Browse files
chore(kbn-ui-shared-deps-npm): make Webpack watch EUI dependency
1 parent 3be2f77 commit 71d9519

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/platform/packages/private/kbn-ui-shared-deps-npm/webpack.config.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,19 @@ module.exports = (_, argv) => {
171171
hints: false,
172172
},
173173

174-
cache: {
175-
type: 'filesystem',
174+
// the gist of the change, making Webpack listen to `node_modules/@elastic/eui` change
175+
watchOptions: {
176+
ignored: /[\\/]node_modules[\\/](?!@elastic($|[\\/]$|[\\/]eui([\\/]|$)))/,
176177
},
177178

179+
// snapshot: {
180+
// managedPaths: [/^(.+?[\\/]node_modules[\\/])(?!@elastic[\\/]eui)/],
181+
// },
182+
183+
// so far only disabling cache worked but we should re-enable it for better performance
184+
// and make `node_modules/@elastic/eui` work at the same time
185+
cache: false,
186+
178187
plugins: [
179188
new NodeLibsBrowserPlugin(),
180189
new CleanWebpackPlugin({
@@ -193,6 +202,11 @@ module.exports = (_, argv) => {
193202
path: Path.resolve(outputPath, '[name]-manifest.json'),
194203
name: '__kbnSharedDeps_npm__',
195204
}),
205+
// adds a useful comment at the top of the DLL for debugging
206+
new webpack.BannerPlugin({
207+
banner: `/* Build: ${new Date().toLocaleString()} */`,
208+
raw: true,
209+
}),
196210
],
197211
};
198212
};

0 commit comments

Comments
 (0)