You already have arcgis/core in your package.json, you don't need the webpack plugin or calcite there. The arcgis-plugin does nothing except help copy assets, but you turned that off and you do it manually in your webpack config.
As I mentioned, it is probably installing an older version of arcgis/core and calcite and other deps as well and that might be causing some issues.
"dependencies": {
// keep this
"@arcgis/core": "^4.28.10",
// remove, probably installs old version
"@arcgis/webpack-plugin": "^4.22.0",
// remove, overrides the arcgis/core dependency
// can't guarantee things won't break when you do this
"@esri/calcite-components": "^2.1.0"
}
As far as your webpack config goes, I would just remove use the arcgis plugin.
const path = require('path');
const miniCssExtractPlugin = require('mini-css-extract-plugin');
const copyPlugin = require('copy-webpack-plugin');
/* creates static resource xml file in ./force-app/main/default/staticresources directory */
const staticResourceCreate = require('static-resource-webpack-plugin');
const staticResourcePath = path.resolve('./claritiGIS/main/default/staticresources');
const ignoreTemplate = path.resolve('./arcGISApp/git-ignore-template.txt');
module.exports = (_, args) => {
const mode = args.mode;
const config = {
mode,
entry: {
index: ['./arcGISApp/index.js', './arcGISApp/index.css']
},
node: false,
output: {
chunkFilename: 'chunks/bundle_[name].js',
path: staticResourcePath + '/ArcGISSDK',
assetModuleFilename: 'assets/[hash][ext][query]'
},
optimization: {
mergeDuplicateChunks: true
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /nodeModules/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.css$/,
use: [miniCssExtractPlugin.loader, 'css-loader']
}
]
},
plugins: [
new staticResourceCreate({
staticResPath: staticResourcePath
}),
new copyPlugin({
patterns: [
{
from: '**',
context: 'node_modules/@esri/calcite-components/dist/calcite/assets/',
to: staticResourcePath + '/CalciteAssets/assets/'
},
{
from: ignoreTemplate,
to: `${staticResourcePath}/ArcGISSDK/.gitignore`,
toType: 'template'
},
{
from: ignoreTemplate,
to: `${staticResourcePath}/CalciteAssets/.gitignore`,
toType: 'template'
}
]
}),
new miniCssExtractPlugin({
filename: '[name].css',
chunkFilename: 'arcgis_[name].css'
})
]
};
return config;
};
On another note, although you can usually install newer versions of calcite than what is defined in the arcgis/core package.json, it doesn't guarantee that it won't break things. You usually do not need to specify a calcite version when installing arcgis/core, the package manager will install the one it expects to use.