@@ -15,7 +15,7 @@ Pre-evaluate code at build-time
1515[ ![ downloads] [ downloads-badge ]] [ npmtrends ]
1616[ ![ MIT License] [ license-badge ]] [ license ]
1717
18- [ ![ All Contributors] ( https://img.shields.io/badge/all_contributors-13 -orange.svg?style=flat-square )] ( #contributors )
18+ [ ![ All Contributors] ( https://img.shields.io/badge/all_contributors-14 -orange.svg?style=flat-square )] ( #contributors )
1919[ ![ PRs Welcome] [ prs-badge ]] [ prs ]
2020[ ![ Code of Conduct] [ coc-badge ]] [ coc ]
2121[ ![ Babel Macro] [ macros-badge ]] [ babel-plugin-macros ]
@@ -97,8 +97,8 @@ See more below.
9797- [ Limitations] ( #limitations )
9898 - [ Code transpilation] ( #code-transpilation )
9999- [ FAQ] ( #faq )
100- - [ How is this different from [ prepack] [ prepack ] ?] ( #how-is-this-different-from-prepackprepack )
101- - [ How is this different from [ webpack] [ webpack ] [ loaders] [ webpack-loaders ] ?] ( #how-is-this-different-from-webpackwebpack-loaderswebpack -loaders )
100+ - [ How is this different from prepack?] ( #how-is-this-different-from-prepack )
101+ - [ How is this different from webpack loaders?] ( #how-is-this-different-from-webpack -loaders )
102102- [ Inspiration] ( #inspiration )
103103- [ Related Projects] ( #related-projects )
104104- [ Other Solutions] ( #other-solutions )
@@ -405,28 +405,30 @@ transpilation.
405405
406406## FAQ
407407
408- ### How is this different from [ prepack] [ prepack ] ?
408+ ### How is this different from prepack?
409409
410- ` prepack ` is intended to be run on your final bundle after you've run your
410+ [ ` prepack ` ] [ prepack ] is intended to be run on your final bundle after you've run your
411411webpack/etc magic on it. It does a TON of stuff, but the idea is that your code
412412should work with or without prepack.
413413
414414` babel-plugin-preval ` is intended to let you write code that would _ not_ work
415415otherwise. Doing things like reading something from the file system are not
416416possible in the browser (or with prepack), but ` preval ` enables you to do this.
417417
418- ### How is this different from [ webpack] [ webpack ] [ loaders] [ webpack-loaders ] ?
418+ ### How is this different from webpack loaders?
419419
420420This plugin was inspired by webpack's [ val-loader] [ val-loader ] . The benefit of
421421using this over that loader (or any other loader) is that it integrates with
422422your existing babel pipeline. This is especially useful for the server where
423- you're probably not bundling your code with ` webpack ` , but you may be using
423+ you're probably not bundling your code with [ ` webpack ` ] [ webpack ] , but you may be using
424424babel. (If you're not using either, configuring babel for this would be easier
425425than configuring webpack for ` val-loader ` ).
426426
427427In addition, you can implement pretty much any webpack loader using
428428` babel-plugin-preval ` .
429429
430+ If you want to learn more, check ` webpack ` documentations about [ ` loaders ` ] [ webpack-loaders ] .
431+
430432## Inspiration
431433
432434I needed something like this for the
@@ -454,7 +456,7 @@ Thanks goes to these people ([emoji key][emojis]):
454456<!-- prettier-ignore -->
455457| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub><b>Kent C. Dodds</b></sub>](https://kentcdodds.com)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=kentcdodds "Code") [π](https://github.com/kentcdodds/babel-plugin-preval/commits?author=kentcdodds "Documentation") [π](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [β οΈ](https://github.com/kentcdodds/babel-plugin-preval/commits?author=kentcdodds "Tests") | [<img src="https://avatars3.githubusercontent.com/u/5610087?v=3" width="100px;"/><br /><sub><b>Matt Phillips</b></sub>](http://mattphillips.io)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=mattphillips "Code") [π](https://github.com/kentcdodds/babel-plugin-preval/commits?author=mattphillips "Documentation") [β οΈ](https://github.com/kentcdodds/babel-plugin-preval/commits?author=mattphillips "Tests") | [<img src="https://avatars1.githubusercontent.com/u/28024000?v=3" width="100px;"/><br /><sub><b>Philip Oliver</b></sub>](https://twitter.com/philipodev)<br />[π](https://github.com/kentcdodds/babel-plugin-preval/issues?q=author%3Aphilipodev "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/2109702?v=3" width="100px;"/><br /><sub><b>Sorin Davidoi</b></sub>](https://toot.cafe/@sorin)<br />[π](https://github.com/kentcdodds/babel-plugin-preval/issues?q=author%3Asorin-davidoi "Bug reports") [π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=sorin-davidoi "Code") [β οΈ](https://github.com/kentcdodds/babel-plugin-preval/commits?author=sorin-davidoi "Tests") | [<img src="https://avatars4.githubusercontent.com/u/1127238?v=4" width="100px;"/><br /><sub><b>Luke Herrington</b></sub>](https://github.com/infiniteluke)<br />[π‘](#example-infiniteluke "Examples") | [<img src="https://avatars4.githubusercontent.com/u/22868432?v=4" width="100px;"/><br /><sub><b>Lufty Wiranda</b></sub>](http://instagram.com/luftywiranda13)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=luftywiranda13 "Code") | [<img src="https://avatars0.githubusercontent.com/u/3877773?v=4" width="100px;"/><br /><sub><b>Oscar</b></sub>](http://obartra.github.io)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=obartra "Code") [β οΈ](https://github.com/kentcdodds/babel-plugin-preval/commits?author=obartra "Tests") |
456458| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
457- | [<img src="https://avatars1.githubusercontent.com/u/14310216?v=4" width="100px;"/><br /><sub><b>pro-nasa</b></sub>](https://github.com/pro-nasa)<br />[π](https://github.com/kentcdodds/babel-plugin-preval/commits?author=pro-nasa "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/9248479?v=4" width="100px;"/><br /><sub><b>Sergey Bekrin</b></sub>](http://bekrin.me)<br /> | [<img src="https://avatars0.githubusercontent.com/u/18613301?v=4" width="100px;"/><br /><sub><b>Mauro Bringolf</b></sub>](https://maurobringolf.ch)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=maurobringolf "Code") [β οΈ](https://github.com/kentcdodds/babel-plugin-preval/commits?author=maurobringolf "Tests") | [<img src="https://avatars1.githubusercontent.com/u/10875678?v=4" width="100px;"/><br /><sub><b>Joe Lim</b></sub>](https://joelim.me)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=xjlim "Code") | [<img src="https://avatars3.githubusercontent.com/u/13483453?v=4" width="100px;"/><br /><sub><b>Marcin Zielinski</b></sub>](https://github.com/marzelin)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=marzelin "Code") | [<img src="https://avatars3.githubusercontent.com/u/1972567?v=4" width="100px;"/><br /><sub><b>Tommy</b></sub>](http://www.tommyleunen.com)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=tleunen "Code") |
459+ | [<img src="https://avatars1.githubusercontent.com/u/14310216?v=4" width="100px;"/><br /><sub><b>pro-nasa</b></sub>](https://github.com/pro-nasa)<br />[π](https://github.com/kentcdodds/babel-plugin-preval/commits?author=pro-nasa "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/9248479?v=4" width="100px;"/><br /><sub><b>Sergey Bekrin</b></sub>](http://bekrin.me)<br /> | [<img src="https://avatars0.githubusercontent.com/u/18613301?v=4" width="100px;"/><br /><sub><b>Mauro Bringolf</b></sub>](https://maurobringolf.ch)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=maurobringolf "Code") [β οΈ](https://github.com/kentcdodds/babel-plugin-preval/commits?author=maurobringolf "Tests") | [<img src="https://avatars1.githubusercontent.com/u/10875678?v=4" width="100px;"/><br /><sub><b>Joe Lim</b></sub>](https://joelim.me)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=xjlim "Code") | [<img src="https://avatars3.githubusercontent.com/u/13483453?v=4" width="100px;"/><br /><sub><b>Marcin Zielinski</b></sub>](https://github.com/marzelin)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=marzelin "Code") | [<img src="https://avatars3.githubusercontent.com/u/1972567?v=4" width="100px;"/><br /><sub><b>Tommy</b></sub>](http://www.tommyleunen.com)<br />[π»](https://github.com/kentcdodds/babel-plugin-preval/commits?author=tleunen "Code") | [<img src="https://avatars0.githubusercontent.com/u/831308?v=4" width="100px;"/><br /><sub><b>Matheus GonΓ§alves da Silva</b></sub>](https://github.com/PlayMa256)<br />[π](https://github.com/kentcdodds/babel-plugin-preval/commits?author=PlayMa256 "Documentation") |
458460
459461<!-- ALL-CONTRIBUTORS-LIST:END -->
460462
0 commit comments