https://github.com/pmlopes/webpack-vertx-plugin
https://github.com/pmlopes/webpack-vertx-plugin
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pmlopes/webpack-vertx-plugin
- Owner: pmlopes
- License: mit
- Created: 2017-07-21T12:19:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-12T09:50:53.000Z (over 8 years ago)
- Last Synced: 2025-02-14T10:56:21.473Z (over 1 year ago)
- Language: JavaScript
- Size: 185 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/js/webpack-vertx-plugin)
[]()
# Webpack Vertx Plugin
This plugin allows you to extract nashorn modules to your node_modules work directory and on compilation success package
your application as a runnable jar.
## WARNING
This plugin expects that your already have Apache Maven installed in your system since will interact with it in order to
perform its tasks.
## Installation
`npm install --save-dev webpack-vertx-plugin`
## Setup
In `webpack.config.js`:
```js
const WebpackVertxPlugin = require('webpack-vertx-plugin');
module.exports = {
...
...
plugins: [
new WebpackVertxPlugin({extractOnly: false})
],
...
}
```
## Example
Insert into your webpack.config.js:
```js
const WebpackVertxPlugin = require('webpack-vertx-plugin');
const path = require('path');
var plugins = [];
plugins.push(new WebpackVertxPlugin());
var config = {
entry: {
app: path.resolve(__dirname, 'src/app.js')
},
output: {
path: path.resolve(__dirname, 'dist'), // regular webpack
filename: 'bundle.js'
},
devServer: {
contentBase: path.resolve(__dirname, 'src') // dev server
},
plugins: plugins,
module: {
loaders: [
{test: /\.js$/, loaders: 'babel'},
{test: /\.scss$/, loader: 'style!css!scss?'},
{test: /\.html$/, loader: 'html-loader'}
]
}
}
module.exports = config;
```
### Config
* `extractOnly`: boolean to only extract resources to `node_modules` (do not execute `mvn package` in the end of the build). **Default: false**
* `verbose`: boolean to display the maven output. **Default: false**
* `watchPattern`: a ant pattern to pass to vertx when watching for file changes, **Default: src/main/resources/\*\*/\***
* `verticle`: the name of the main verticle.