add plugins to try to fix issue

This commit is contained in:
Megan Rogge
2024-11-13 16:24:27 -06:00
parent c7c8d5fe70
commit 4d2352711a

View File

@@ -4,10 +4,11 @@
*--------------------------------------------------------------------------------------------*/
//@ts-check
'use strict';
const path = require('path');
const withDefaults = require('../shared.webpack.config');
const webpack = require('webpack');
module.exports = withDefaults({
context: __dirname,
@@ -20,5 +21,17 @@ module.exports = withDefaults({
resolve: {
mainFields: ['module', 'main'],
extensions: ['.ts', '.js'] // support ts-files and js-files
}
},
plugins: [
// Handle dynamic imports from the autocomplete directory
new webpack.ContextReplacementPlugin(
// The (\\|\/) piece accounts for path separators in *nix and Windows
/\.\/autocomplete$/,
path.resolve(__dirname, 'autocomplete'),
{
// Include only .js files
'./': /\.js$/
}
)
]
});