webpack-data-url
Pull in remote dependencies that contain data you need before each build.
Getting Started
These instructions will get you up and running with pulling in your data to your project before you compile your Webpack build.
Prerequisites
- Webpack 4
Installing
- Install to your dev-dependencies.
npm install --save-dev webpack-data-url
Usage
- webpack.config.js
import WebpackDataUrl from 'webpack-data-url'; const config = { plugins: [ new WebpackDataUrl([options]), ], }
Options
Name | Type | Default | Description |
---|---|---|---|
url |
{String} |
`` | Url that you wish to request data from. |
directory |
{String} |
./data.json |
Directory and name of file you wish to store your data from. |