pim-community-dev
pim-community-dev copied to clipboard
How do you override .tsx files from AkeneoPimStructureBundle?
Hi I cannot find any documentation how can I override specifically this file: src/public/bundles/akeneopimstructure/js/attribute-option/components/New.tsx
Could someone explain please? This file does not have any assigned key in requirejs.yml files
The only way I've figured out so far is rewriting the resource path in webpack.config.js with Webpack's NormalModuleReplacementPlugin. Something like:
plugins: [
new webpack.NormalModuleReplacementPlugin(
/public\/bundles\/akeneopimstructure\/js\/attribute-option\/components\/New.tsx/,
result => {
//console.log(result);
result.resource = result.resource.replace(
'public/bundles/akeneopimstructure/js/attribute-option/components/',
'public/bundles/myownveryspecialbundle/js/attribute-option/components/'
);
//console.log(result);
}
)]
Is there any other way at the moment? Will there be a documentation on that in the v6?