@gluons/vue-pack-load-config
v1.20.3
Published
A configuration loader for vue-pack.
Downloads
72
Maintainers
Readme
vue-pack-load-config
A configuration loader for vue-pack.
Using JoyCon under the hood.
Installation
npm install --save-dev @gluons/vue-pack-load-config
# or
yarn add --dev @gluons/vue-pack-load-config
Usage
import { Configuration } from '@gluons/vue-pack-types';
import loadConfig from '@gluons/vue-pack-load-config';
let config: Configuration;
loadConfig()
.then(loadedConfig => {
config = loadedConfig;
})
.catch(err => {
console.error(err);
});
API
loadConfig(privilegeConfig, configPath)
Return: Promise<Configuration>
Lookup and load vue-pack
configuration from file.
Configuration files:
- vue-pack.config.js
- vue-pack.config.json
- vue-pack.config.yaml
- vue-pack.config.yml
- vue-pack.config.ts
privilegeConfig
Type: Partial<Configuration> | Configuration
High priority config to override config from config file.
configPath
Type: string
Path to config file