@atlassian/wrm-troubleshooting
v0.7.0
Published
A tool that can help you with troubleshooting the configuration of webpack and Atlassian P2 project.
Maintainers
Readme
WRM Troubleshooting tool
A tool that can help you with troubleshooting the configuration of webpack and Atlassian P2 project.
Usage
The troubleshooting tool was designed to check and verify the configuration of the Atlassian P2 plugin, a modern front-end setup configured with webpack and @atlassian/webresource-webpack-plugin plugin.
Additionally, the troubleshooting tool can verify if the webpack bundled JS code can be accessed with Atlassian Web-Resource Manager (WRM) inside the Atlassian product runtime.
To check if your project was configured correctly open a terminal and navigate to the root directory of your project:
cd /my-project/locationNext, run the npx command:
npx @atlassian/wrm-troubleshooting
# or run a standalone command if the package is installed globally
wrm-troubleshootingThe tool will ask you a few questions and will guide you in case your project configuration is invalid or broken.
You can also read the next paragraph to learn how to install the package globally if you prefer that.
Example and demo

Watch the demo with asciinema
Custom Babel environments
Some projects are using Babel with @babel/preset-env preset and can define a custom environment overrides for webpack:
Example of .babelrc or babel.config.js files
{
env: {
development: {
presets: [
// A list of Babel preset
],
plugins: [
// A list of Babel plugins
],
},
production: {
plugins: [
// A list of Babel plugins
],
},
},
}In this case you need to guide the WRM troubleshooting tool about what environment should be selected to bundle the webpack code.
To do that, you can execute the npx @atlassian/wrm-troubleshooting command with the BABEL_ENV variables like so:
BABEL_ENV=production npx @atlassian/wrm-troubleshootingInstallation
You don't need to install this package. You can use it with the npx command.
In case you still would like to install the package, you can install it globally with NPM:
npm install --global @atlassian/wrm-troubleshootingor by Yarn
yarn global add @atlassian/wrm-troubleshootingMinimum requirements
This plugin is compatible with:
- Node 14+
webpackv4 andwebpackv5atlassian-webresource-webpack-pluginv4, v5, v6 and@atlassian-webresource-webpack-pluginv7+
