vue.js - 如何在 vue 页面中读取我的最终 yaml 配置文件?
问题描述
我正在使用 nuxt 和config.yml
扩展.config.yml
文件。我想在我想要的任何页面中阅读最终生成的配置。怎么做?
如果我添加const config = require('config-yml');
.vue 文件或任何插件 .js 我有很多错误编译。
解决方案
好的,找到了。
env: {
config: config
}
在 nuxt.config.js
但没有找到如何从 .config.yml 获取
推荐阅读
- css - rmarkdown 中的着色选项卡
- android - 将图片保存在某个存储位置并将其路径存储到 SQLite 数据库表中
- javascript - 无法从 asp.net 中的 c# 获取 javascript 中的数据
- c# - 为什么 DateTime 上的独立操作顺序(Add 和 ToLocalTime/ToUniversalTime)会改变结果?
- laravel-5 - 尽管导入成功,Laravel Excel 3.1 仍会引发“属性没有默认值”错误
- matlab - 在 MacOS 上的 Matlab 中运行执行文件(gfortran)
- grafana - zabbix如何使用grafana的“状态面板”
- python - 将可变大小的 numpy 数组转换为 Tensorflow 张量
- static - 可以使用什么静态分析工具来捕获条件流上的错误?
- spring - 我们可以替换XMl文件中的Springframework注解(@CacheConfig、@Cacheable、@CachePut)吗?