workerize-loader
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -19,3 +19,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var filename = loaderUtils.interpolateName(this, ((options.name || '[hash]') + ".worker.js"), { | ||
context: options.context || this.options.context, | ||
context: options.context || this.rootContext || this.options.context, | ||
regExp: options.regExp | ||
@@ -22,0 +22,0 @@ }); |
{ | ||
"name": "workerize-loader", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Automatically move a module into a Web Worker (Webpack loader)", | ||
@@ -10,6 +10,5 @@ "main": "dist/index.js", | ||
"prepublishOnly": "npm run build", | ||
"dev": "webpack-dev-server --no-hot --config test/webpack.config.js", | ||
"release": "npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish", | ||
"test": "npm run build && webpack --config test/webpack.config.js && npm run -s mocha", | ||
"mocha": "concurrently -r --kill-others \"serve -p 42421 test/dist\" \"mocha-chrome http://localhost:42421\"" | ||
"dev": "karmatic watch --no-headless", | ||
"test": "npm run build && karmatic", | ||
"release": "npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish" | ||
}, | ||
@@ -38,22 +37,6 @@ "eslintConfig": { | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-preset-env": "^1.6.1", | ||
"chai": "^4.1.2", | ||
"chai-as-promised": "^7.1.1", | ||
"concurrently": "^3.5.1", | ||
"css-loader": "^0.28.8", | ||
"eslint": "^4.15.0", | ||
"eslint": "^4.16.0", | ||
"eslint-config-developit": "^1.1.1", | ||
"exports-loader": "^0.6.4", | ||
"fast-async": "^6.3.0", | ||
"html-webpack-plugin": "^2.30.1", | ||
"microbundle": "^0.2.4", | ||
"mocha": "^4.1.0", | ||
"mocha-chrome": "^1.0.3", | ||
"mocha-puppeteer": "^0.13.0", | ||
"serve": "^6.4.4", | ||
"style-loader": "^0.19.1", | ||
"webpack": "^3.10.0", | ||
"webpack-dev-server": "^2.10.1" | ||
"karmatic": "^1.0.5", | ||
"microbundle": "^0.4.2" | ||
}, | ||
@@ -60,0 +43,0 @@ "dependencies": { |
@@ -1,8 +0,4 @@ | ||
<p align="center"> | ||
<img src="https://i.imgur.com/JLAwk0S.png" width="300" height="300" alt="workerize-loader"> | ||
<br> | ||
<a href="https://www.npmjs.org/package/workerize-loader"><img src="https://img.shields.io/npm/v/workerize-loader.svg?style=flat" alt="npm"></a> <a href="https://travis-ci.org/developit/workerize-loader"><img src="https://travis-ci.org/developit/workerize-loader.svg?branch=master" alt="travis"></a> | ||
</p> | ||
<img src="https://i.imgur.com/HZZG8wr.jpg" width="1358" alt="workerize-loader"> | ||
# workerize-loader | ||
# workerize-loader [![npm](https://img.shields.io/npm/v/workerize-loader.svg?style=flat)](https://www.npmjs.org/package/workerize-loader) [![travis](https://travis-ci.org/developit/workerize-loader.svg?branch=master)](https://travis-ci.org/developit/workerize-loader) | ||
@@ -21,3 +17,3 @@ > A webpack loader that moves a module and its dependencies into a Web Worker, automatically reflecting exported functions as asynchronous proxies. | ||
```sh | ||
npm install --save-dev workerize-loader | ||
npm install -D workerize-loader | ||
``` | ||
@@ -52,4 +48,10 @@ | ||
### Credit | ||
The inner workings here are heavily inspired by [worker-loader](https://github.com/webpack-contrib/worker-loader). It's worth a read! | ||
### License | ||
[MIT License](LICENSE.md) © [Jason Miller](https://jasonformat.com) | ||
[MIT License](https://oss.ninja/mit/developit) © [Jason Miller](https://jasonformat.com) |
@@ -20,3 +20,3 @@ import path from 'path'; | ||
const filename = loaderUtils.interpolateName(this, `${options.name || '[hash]'}.worker.js`, { | ||
context: options.context || this.options.context, | ||
context: options.context || this.rootContext || this.options.context, | ||
regExp: options.regExp | ||
@@ -23,0 +23,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23799
4
56
11
302