https://github.com/cmstead/quokka-package-loader
https://github.com/cmstead/quokka-package-loader
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cmstead/quokka-package-loader
- Owner: cmstead
- Created: 2019-07-23T04:45:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-23T05:54:49.000Z (almost 7 years ago)
- Last Synced: 2026-05-26T09:33:30.608Z (26 days ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quokka Package Loader #
When you absolutely must load that file into Quokka...
## Disclaimer ##
Quokka is software which requires a paid license for certain features. If you use Quokka on the regular and like the product, you might be well advised to pay for a license.
This package is for educational purposes only.
## Installation ##
Install the package like so:
`npm install quokka-package-loader --save-dev`
Add the package name to your Quokka configuration:
```javascript
{
"plugins": [
"quokka-package-loader"
]
}
```
Or add it to your package file:
```json
"quokka": {
"plugins": [
"quokka-package-loader"
]
}
```
That's it.
## Using Quokka Package Loader ##
Quokka package loader will allow you to hot-load files into a JS file being run with Quokka. Do the following and you'll be all set:
```javascript
// This is the important bit
const loader = loaderFactory(__dirname);
// Now you can side-load modules into your file
const myLocalModule = loader.load('./path/to/module');
myLocalModule.doStuff();
```