Skip to content

Commit

Permalink
Release 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Apr 26, 2018
1 parent 4ee9c20 commit a249ac9
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 47 deletions.
45 changes: 24 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Meteor-Webpack can resolve any atmosphere packages and Meteor modules like you a
- You can migrate your existing Webpack project to Meteor easily.
- You can use your existing Webpack loaders and plugins without a great modification including the ones don't exist as an atmosphere package.
- Hot Module Replacement without reloading in each compilation using Webpack Dev Middleware together with Meteor's `connect`-compatible HTTP Server
- HMR is available for server-side code, so your re-compiled server-side code will be replaced in 'already running' server without restart. So, the recompilation of server-side code takes less time than regular Meteor bundler's.
- Comparisons with other bundlers are explained [here](https://webpack.js.org/comparison/).

## Comparison with other solutions in Meteor
Expand Down Expand Up @@ -102,40 +103,42 @@ don't forget to install `webpack-dev-middleware` package from NPM;
npm install webpack-dev-middleware --save
```

#### [Hot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/)
### Server Configuration

- Process is the same with Webpack; so you have to just change your client configuration;
#### Loading NPM modules on runtime instead of compiling them by Meteor

- Add `hot` field which is `true`,
- Install `webpack-node-externals`

```js
devServer: {
hot: true
}
```bash
npm install webpack-node-externals --save
```

- and add the necessary plugin
- Add externals into the server configuration in `webpack.config.js`

```js
plugins: {
new webpack.HotModuleReplacementPlugin()
}
externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
```

- Then install `webpack-dev-middleware` and [`webpack-hot-middleware`](https://github.com/glenjamin/webpack-hot-middleware) in your project.
### [Hot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/)

### Server Configuration
- Process is the same with Webpack; so you have to just change your client and server configuration;

#### Loading NPM modules on runtime instead of compiling them by Meteor
- Add `hot` field for both client and server which is `true`,

- Install `webpack-node-externals`

```bash
npm install webpack-node-externals --save
```js
devServer: {
hot: true
}
```

- Add externals into the server configuration in `webpack.config.js`
- and add the necessary plugin only for client!

```js
externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
```
plugins: {
new webpack.HotModuleReplacementPlugin()
}
```

- Then install `webpack-dev-middleware`,
- Install client-side HMR middleware [`webpack-hot-middleware`](https://github.com/glenjamin/webpack-hot-middleware) in your project
- Install server-side HMR middleware [`webpack-hot-server-middleware`](https://github.com/60frames/webpack-hot-server-middleware) in your project
2 changes: 1 addition & 1 deletion atmosphere-packages/webpack-dev-middleware/package.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package.describe({
name: 'ardatan:webpack-dev-middleware',
debugOnly: true,
version: '0.0.2',
version: '0.0.3',
summary: 'Webpack Dev Middleware for Meteor',
git: 'https://github.com/ardatan/meteor-webpack',
documentation: '../../README.md'
Expand Down
4 changes: 2 additions & 2 deletions atmosphere-packages/webpack/.versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ardatan:[email protected].2
[email protected]
ardatan:[email protected].3
[email protected]
2 changes: 1 addition & 1 deletion atmosphere-packages/webpack/package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'ardatan:webpack',
version: '0.0.2',
version: '0.0.3',
summary: 'Webpack Integration for Meteor',
git: 'https://github.com/ardatan/meteor-webpack',
documentation: '../../README.md'
Expand Down

0 comments on commit a249ac9

Please sign in to comment.