
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@korodrogerie/webpack-plugin-mark-as-assets
Advanced tools
Webpack plugin which allows you to mark your Shopware 6 plugins as assets, so they're excluded from Shopware's all.js. The bundled JavaScript file can be included in your storefront theme where you want it.
Webpack plugin which allows you to mark your Shopware 6 plugins as assets, so they're excluded from Shopware's all.js. The bundled JavaScript file can be included in your storefront theme where you want it.
Install the plugin as one of your NPM dev dependencies:
npm installl --save-dev @korodrogerie/webpack-plugin-mark-as-assets
Now create a new file called storefront/build/webpack.config.js to extend Shopware's Webpack building pipeline. Next up, extend the default Webpack configuration and add the plugin to it:
module.exports = ({ config }) => {
config.plugins.push(new WebpackMarkPluginsAsAssets({
plugins: ['KoroProductOrigin']
}));
}
The plugin requires an array of plugins which should be transformed. After the next ./psh.phar storefront:build / bin/build-storefront.sh you're finding a new folder storefront inside the public folder of your Shopware 6 plugin.
After copying the assets using the command bin/console assets:install you can use the Twig function {{ assets() }} to include your bundled JavaScript wherever you want to:
{{ asset('bundles/yourpluginname/yourpluginname.js') }}
Shopware uses their own Webpack plugin called WebpackCopyAfterBuild which copies bundled JavaScript files from the storefront module to your Shopware 6 plugin. Afterwards Shopware collects all bundled JavaScript plugins inside a plugin when it's located inside a dist folder and compresses all found Shopware 6 plugins together into an all.js file.
This Webpack plugin allows you to intercept this behavior of Shopware. The plugin hooks into the step afterPlugins hook from Webpack which allows to modify Webpack plugin configurations.
Internally the plugin WebpackCopyAfterBuild contains a map containing chunk names and the corresponding destination path of the plugin.
This plugin alters the destination path and prevents Shopware's theme compiliation step to collect the bundled JavaScript files.
Licensed under MIT
Copyright (c) 2020-present Koro Handels GmbH
FAQs
Webpack plugin which allows you to mark your Shopware 6 plugins as assets, so they're excluded from Shopware's all.js. The bundled JavaScript file can be included in your storefront theme where you want it.
We found that @korodrogerie/webpack-plugin-mark-as-assets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.