@atlassian/wrm-troubleshooting

0.6.3 • Public • Published

WRM Troubleshooting tool

node version npm downloads

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/location

Next, run the npx command:

npx @atlassian/wrm-troubleshooting

# or run a standalone command if the package is installed globally
wrm-troubleshooting

The 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

WRM Troubleshooting 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-troubleshooting

Installation

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-troubleshooting

or by Yarn

yarn global add @atlassian/wrm-troubleshooting

Minimum requirements

This plugin is compatible with:

  • Node 14+
  • webpack v4 and webpack v5
  • atlassian-webresource-webpack-plugin v4 and atlassian-webresource-webpack-plugin v5

Package Sidebar

Install

npm i @atlassian/wrm-troubleshooting

Weekly Downloads

72

Version

0.6.3

License

Apache-2.0

Unpacked Size

176 kB

Total Files

86

Last publish

Collaborators

  • atlassianartifactteam
  • decompil3d
  • rafalsatl
  • flipatlas
  • kbielaski
  • dwalker
  • atlassian-aui
  • mdejongh
  • mszczepanski
  • cdarroch
  • macku
  • dboyd
  • dmorrow
  • mstaas
  • cwhittington
  • 1999-atlassian
  • amcculloch
  • wyasvoin
  • xqiu
  • gleal-atlassian
  • mszpyra
  • bcytrowski
  • sraj
  • tilwin_atlassian
  • mrzymski
  • media-build-bot
  • akishore
  • timse
  • mkem114
  • tsebastian
  • sfp-release-bot