Learn more from the webpack official website. If webpack is missing, open the embedded Terminal ( Alt+F12) and type:Ĭreate one or several configuration files depending on your project structure ( New | JavaScript file). Make sure webpack is listed in the dependencies or devDependencies object of your package.json. Configuring webpack in IntelliJ IDEA Add webpack to your package.json
Before you startĭownload and install Node.js.
In projects that consist of multiple modules with different webpack configurations, IntelliJ IDEA can automatically detect the relevant configuration file for each module and use the module resolution rules from it, see Specifying the webpack configuration file to use below.įor webpack version 2 and later, IntelliJ IDEA provides code completion and quick documentation look-up for options in webpack configuration files. This support improves coding assistance in JavaScript files by taking into account webpack module resolution and resolve aliases. You can use it for hosting a Node.IntelliJ IDEA integrates with the webpack module bundler.
To simulate it on localhost, follow these steps. I've hosted my add-in on Amazon S3, which is another way of hosting files. Those files that are produced, need to be hosted somewhere. However, when running your app in production, the tutorial says that you should do npm run build. In my development setup, for an add-in with a task pane, I've specified that the files are hosted on localhost, like this: In your manifest.xml file you'll notice that you specify the address where your files are hosted.
The add-in tutorial shows you how to run a Webpack development server to host the files on while you are coding ( npm run start). It can be done on either localhost or in some other hosting service. It can be done with any web server - a simple python web server, Apache, Node.js HTTP server, or anything similar. Making your add-in available inside Outlook or Office requires that you host your files somewhere. In any case, the built files is not a Node.js web server. The most common is probably building an add-in with a task pane - which is basically a web page. The files that are produced from your project when building should be at least some JavaScript, then perhaps HTML and some CSS, depending on what kind of add-in you're building. const merge = require('webpack-merge') Ĭonst common = require('./')
'function-file': './function-file/function-file.js' const path = require('path') Ĭonst CleanWebpackPlugin = require('clean-webpack-plugin') Ĭonst HtmlWebpackPlugin = require('html-webpack-plugin') Here are some configurations that I am using, So, please guide me which file should I reference to when using pm2 start ?
I tried pm2 run-script build, (after modifications in package.json and files)
So, I created my Outlook Addin using basic tutorials from, all went well. I am totally new to NodeJS, Webpack and specially to Outlook Addin.