You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
while using webPack 4 SplitChunksPlugin to pack common code from node_modules into one chunk specially arcgis-js-api code into "vendor.[chunkHash].js" and cache it on the client, the code compiles but the map never shows up and In developer tools console below error shows up Error: is Uncaught TypeError: Cannot read property 'registerAbsMids' of undefined
at index.4530b1a0d640ff5c9bcd.js:2
at index.4530b1a0d640ff5c9bcd.js:13
When I open "ndex.4530b1a0d640ff5c9bcd.js" the error is at first line
function(){
(this||window)["webpackJsonp"].registerAbsMids({
Expected Behavior
While using SplitChunksPlugin it should pack all the vendor code from node_module in one vendor chunk and all other source code into differnt chunks depending on the inputs provided in the webPack config file and map should show up in browser.
Actual Behavior
It compiles the code and pack it into one vendor chunk and other file correctly. But throws an error while running in browser.
Possible Fix
no clue why it is happening.
Steps to Reproduce
Install ArcGIS CLI npm install -g @arcgis/cli
Create a test project with ArcGIS CLI arcgis create testProject
Open webpack.config.js file from the above created project and add below configuration in under optimization part.
if you want to analyse the chunk and code spliced by split chunk plugin use webpack-bundle-analyzer
Context
I am not able to use the SplitChunksPlugin plugin which is very use-full in splitting the code, caching the code on client and considerably reducing the size of the package.
Your Environment
Webpack version: "4.20.1"
@types/arcgis-js-api : "~4.11.0",
@arcgis/webpack-plugin: "~4.12.1"
browser name : Chrome 76.0.3809.132
The text was updated successfully, but these errors were encountered:
Manisharote
changed the title
Error: Not working with **[SplitChunksPlugin](https://webpack.js.org/plugins/split-chunks-plugin/)** plugin
Error: Not working with webpack 4 "SplitChunksPlugin" plugin
Sep 14, 2019
Arcgis-webpack-plugin not working with SplitChunksPlugin
Description
while using webPack 4 SplitChunksPlugin
to pack common code from node_modules into one chunk specially arcgis-js-api code into "vendor.[chunkHash].js" and cache it on the client, the code compiles but the map never shows up and In developer tools console below error shows up
Error: is Uncaught TypeError: Cannot read property 'registerAbsMids' of undefined
at index.4530b1a0d640ff5c9bcd.js:2
at index.4530b1a0d640ff5c9bcd.js:13
When I open "ndex.4530b1a0d640ff5c9bcd.js" the error is at first line
function(){
(this||window)["webpackJsonp"].registerAbsMids({
Expected Behavior
While using SplitChunksPlugin
it should pack all the vendor code from node_module in one vendor chunk and all other source code into differnt chunks depending on the inputs provided in the webPack config file and map should show up in browser.
Actual Behavior
It compiles the code and pack it into one vendor chunk and other file correctly. But throws an error while running in browser.
Possible Fix
no clue why it is happening.
Steps to Reproduce
splitChunks: {
cacheGroups: {
vendors: {
test: /[\/]node_modules[\/]/,
name: "vendors",
chunks: "all"
}
}
},
runtimeChunk: {
name: "manifest"
},
Context
I am not able to use the SplitChunksPlugin
plugin which is very use-full in splitting the code, caching the code on client and considerably reducing the size of the package.
Your Environment
The text was updated successfully, but these errors were encountered: