I am not using alias for any item in plugin. Here is some code generated automatically while packaging
<dependency>jira-frontend-api:jquery-2.2.4</dependency>
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jquery */ "jira-frontend-api:jquery-2.2.4/undefined");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_2__);
/***/ "jira-frontend-api:jquery-2.2.4/undefined":
/*!*********************************************************************!*\
!*** external {"amd":"jquery","commonjs":"jquery","root":"jQuery"} ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = undefined;
/***/ })
I am not sure how i can use this to debug.
Also here is my config file -
const path = require('path');
const WrmPlugin = require('atlassian-webresource-webpack-plugin');
const mode = process.env.NODE_ENV || 'development';
const languages = {
"en": ['./src/i18n/macro.properties']
}
// const providedDependencies = {};
const providedDependencies = {
"jquery": { // Name of the module we will import inside the JS files
dependency: 'jira-frontend-api:jquery-2.2.4', // The name of the WRM module where we can find the jQuery
import: {
amd: 'jquery',
commonjs: 'jquery',
root: 'jQuery',
}
}
};
//director to create the initial bundle
let outputDir = path.resolve(__dirname, 'dist');
//directory to create the platform bundle
let platform_outputDir =path.resolve(__dirname, 'dist_server');
//main webpack config to load all modules
const get_bundle_config = () => {
return {
mode: mode,
entry: {
standalone: './src/index.js',
},
devtool: '',
devServer: {
contentBase: outputDir,
},
output: {
path: outputDir,
publicPath: '/dist',
filename: '[name]/bundle.js'
},
module: {
rules: [...]
},
plugins: [...],
optimization: {
splitChunks: {
chunks: 'all'
}
},
}
}
module.exports = () => {
let webpack_config;
let config = get_bundle_config();
//remove public path
delete config.output.publicPath;
//update output dir
config.devServer.contentBase = platform_outputDir;
config.output.path = platform_outputDir;
delete config.entry["admin"];
//add atlassian webpack for
config.plugins.splice(config.plugins.length - 1, 0, new WrmPlugin({
pluginKey: "com",
contextMap: {
standalone: ['atl.general', 'atl.admin'],
},
xmlDescriptors: path.resolve(platform_outputDir, 'META-INF', 'plugin-descriptors', 'wr-defs.xml'),
providedDependencies: providedDependencies
}))
webpack_config = [config]
return webpack_config;
}
I have deleted most of the config so it makes more sense.