feat: externalized tool configuration

This commit is contained in:
Corentin Thomasset 2021-05-28 19:44:27 +02:00
parent c3adfe30ec
commit 690bd099ef
No known key found for this signature in database
GPG key ID: DBD997E935996158
31 changed files with 387 additions and 300 deletions

View file

@ -0,0 +1,13 @@
const YAML = require('yaml')
const loader = function (source, map) {
this.callback(
null,
`export default function (Component) {
Component.options.__toolConfig = ${JSON.stringify(YAML.parse(source))}
}`,
map
)
}
module.exports = loader