New to WebPack?You may want to check out the article How to integrate WebPack into Visual Studio 2015 by Ilya Pirozhenko Install WebPackIn order to use this extension, you must have WebPack installed globally or locally in your project. Use npm to install it globally by typing the following in a command line:
To use the server functionality you also need to install webpack-dev-server like so:
If you wish to use babel to run WebPack, you must first install it locally in your project:
Config filesThe WebPack Task Runner automatically triggers when it finds WebPack configuration files. The following file names are supported:
Important! The Task Runner Explorer requires the config files to be located at the root of the project or solution - not in a project sub folder. Any config file will have a WebPack logo watermark at the bottom right corner of the editor window. You can toggle the visibility of the watermark by clicking on it. Dev serverThis extension supports webpack-dev-server and can invoke it through the Task Runner Explorer. Make sure to setup the details in the webpack.config.js file like so: devServer: { contentBase: ".", host: "localhost", port: 9000 }, Task Runner ExplorerOpen Task Runner Explorer by right-clicking the WebPack configuration file and selecting Task Runner Explorer from the context menu: The following tasks are supported:
Each task can be executed by double-clicking the task. SwitchesWebPack CLI switches are available on the left-hand side toolbar. The switches are:
Each switch enabled will be added to the arguments when invoking the WebPack CLI.
All switches are toggle buttons that can be left on or off for as long as needed. Development / ProductionWhen executing a Production task, the extension will automatically set
BindingsTask bindings make it possible to associate individual tasks with Visual Studio events such as Project Open etc. License |