babel-plugin-ng-hot-reload
Advanced tools
Comparing version 2.1.0-alpha006 to 2.1.0
@@ -72,3 +72,3 @@ "use strict"; | ||
// Also adds an destructor to the outside of the wrapper to make the | ||
// exports from inside the wrapper avaiable in global scope | ||
// exports from inside the wrapper available in global scope | ||
// | ||
@@ -107,3 +107,3 @@ // export default Controller; | ||
moduleExports.push(t.objectProperty(t.identifier(identifierKey), value)); | ||
// Properties for the outer const destrcutor | ||
// Properties for the outer const destructor | ||
extractedExports.push(t.variableDeclarator(t.identifier(identifierKey), t.memberExpression(t.identifier(OUTER_EXPORT_VARIABLE), t.identifier(identifierKey)))); | ||
@@ -146,3 +146,3 @@ // Restore the topLevelexports | ||
if (path.node.source) { | ||
// Same behaviour as ExportAllDeclaration | ||
// Same behavior as ExportAllDeclaration | ||
state.topLevelExportModule.add(path.node); | ||
@@ -149,0 +149,0 @@ state.pathsToRemove.add(path); |
{ | ||
"name": "babel-plugin-ng-hot-reload", | ||
"version": "2.1.0-alpha006", | ||
"version": "2.1.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -48,3 +48,3 @@ # 🔥 babel-plugin-ng-hot-reload | ||
| `angularGlobal` | `false` (false or string) | Define whether angular is provided as global variable. Set to `'angular'` when `angular` is your global variable. | | ||
| `forceRefresh` | `true` (boolean) | Whether to reload window automatically when a change in source files can't be hot-reloaded. Note that Webpack DevServer also has its own option hotOnly, which should also be configured correctly to get the behaviour you want when hot reloading fails.<br />([ng-hot-reload option](https://github.com/noppa/ng-hot-reload#client-options)) | | ||
| `forceRefresh` | `true` (boolean) | Whether to reload window automatically when a change in source files can't be hot-reloaded. Note that Webpack DevServer also has its own option hotOnly, which should also be configured correctly to get the behavior you want when hot reloading fails.<br />([ng-hot-reload option](https://github.com/noppa/ng-hot-reload#client-options)) | | ||
| `preserveState` | `true` (boolean) | If true, the library attempts to preserve some state in scope and controller instances when they are reloaded. Preserving state is an experimental feature and quite "hackish" so it may cause problems in some cases. Setting this to `false` might help if you run into weird errors.<br />([ng-hot-reload option](https://github.com/noppa/ng-hot-reload#client-options)) | | ||
@@ -79,3 +79,3 @@ | `angularReference` | `"require('angular'), angular"` (string) | JavaScript expression that will be evaluated to get a reference to angular.<br />([ng-hot-reload option](https://github.com/noppa/ng-hot-reload#client-options)) | | ||
Per default the plugin looks for imports of `'angular'`-package and only adds the hot-module-reload code to this modules. | ||
However in some environments angular is used as a global variable without beeing imported, so the plugin has a `angularGlobal` setting which supports the use of angular as a global variable: | ||
However in some environments angular is used as a global variable without being imported, so the plugin has a `angularGlobal` setting which supports the use of angular as a global variable: | ||
@@ -114,10 +114,4 @@ ```js | ||
When you are using this plugin together with [`babel-plugin-angularjs-annotate`](https://github.com/schmod/babel-plugin-angularjs-annotate) make sure that the ngAnnotate plugin is added before this plugin in your `.babelrc.js`: | ||
You can also use the plugin together with [`babel-plugin-angularjs-annotate`](https://github.com/schmod/babel-plugin-angularjs-annotate). | ||
```js | ||
module.exports = { | ||
plugins: ['angularjs-annotate', 'babel-plugin-ng-hot-reload'], | ||
}; | ||
``` | ||
For an example check out the [Webpack / TypeScript example](./examples/typescript-webpack/). | ||
@@ -136,7 +130,7 @@ | ||
Unfortunatly there is currently an issue related to parcel: | ||
Unfortunately there is currently an issue related to parcel: | ||
- No hot-module-replacement for HTML templates ([parcel#943](https://github.com/parcel-bundler/parcel/issues/943)) | ||
### Browser-compability | ||
### Browser-compatibility | ||
@@ -143,0 +137,0 @@ The plugin is compatible with the latest versions of Chrome, Firefox and IE11. |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
20768
147