ES6使用目录路径import
除了对具体文件进行导出外,还可以对文件夹进行导出,但是需要index文件,存在目录
1 | --component |
其中index文件中写入
1 | //index.jsx |
就可以在其它文件中,直接对component文件夹进行导入
1 | //此处component是个文件夹,会自动读取index文件 |
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true