File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+ try {
2
+ module . exports = require ( 'workerize-loader' ) ;
3
+ }
4
+ catch ( e ) {
5
+ console . warn ( "Warning: workerize-loader is not installed." ) ;
6
+ module . exports = function ( ) {
7
+ throw "To use workerize as a loader, you must install workerize-loader." ;
8
+ }
9
+ }
Original file line number Diff line number Diff line change 3
3
"version" : " 0.1.2" ,
4
4
"description" : " Run a module in a Web Worker." ,
5
5
"main" : " dist/workerize.js" ,
6
- "module" : " src/index.js" ,
6
+ "module" : " dist/workerize.m.js" ,
7
+ "source" : " src/index.js" ,
7
8
"repository" : " developit/workerize" ,
9
+ "loader" : " ./loader.js" ,
8
10
"scripts" : {
9
11
"build" : " microbundle" ,
10
12
"prepublishOnly" : " npm run build" ,
11
13
"release" : " npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish" ,
12
14
"test" : " echo \" Error: no test specified\" && exit 0"
13
15
},
16
+ "files" : [
17
+ " src" ,
18
+ " dist" ,
19
+ " loader.js"
20
+ ],
14
21
"keywords" : [
15
22
" worker" ,
16
23
" web workers" ,
You can’t perform that action at this time.
0 commit comments