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
I need to debug an extension in ms2-georchestra without horrific minify code in test env (e.g urb@map, but will works with cadastrapp or wathever) and i think i get a solution.
First, we have to know that npm run ext:buid command always build extension in prod mode.
I dunno if this is due to MS2 but i'm sur it's just because many use cases build an extension to works in prod env.
So, here my tips, not sur it's the best (but it seems to works) :
Hi,
I need to debug an extension in ms2-georchestra without horrific minify code in test env (e.g urb@map, but will works with cadastrapp or wathever) and i think i get a solution.
First, we have to know that
npm run ext:buid
command always build extension inprod
mode.I dunno if this is due to MS2 but i'm sur it's just because many use cases build an extension to works in prod env.
So, here my tips, not sur it's the best (but it seems to works) :
https://github.com/geosolutions-it/MapStoreExtension/blob/master/package.json#L128
By this command with
--env mode=true
:"ext:build": "rimraf ./dist && mkdirp ./dist && webpack --env mode=true --progress --color --config build/extension/prod-webpack.config.js",
build/extension/prod-webpack.config.js
:Change this last line :
module.exports = createExtensionWebpackConfig({ prod: true, name, ...commons, plugins});
by this line to use
env.mod
value from package.json file inserted before) ....module.exports = env => createExtensionWebpackConfig({ prod: !env.mode === 'false', name, ...commons, plugins });
Run
npm run ext:build
commandDeploy zip extension as usual
So, all files are always in only one javascript file (in browser source console tab) but the code is more... readable as exepected in local dev env.
The text was updated successfully, but these errors were encountered: