naive-ui/build/loaders/naive-ui-doc-loader.js

9 lines
295 B
JavaScript
Raw Normal View History

const convertMd2Doc = require('./convert-md-to-doc')
2020-09-04 01:06:39 +08:00
const projectPath = require('./project-path')
2021-04-05 14:38:39 +08:00
module.exports = async function (content, path) {
2020-02-24 17:07:35 +08:00
const env = process.env.NODE_ENV
const relativeUrl = path.replace(projectPath + '/', '')
2021-04-05 14:38:39 +08:00
return convertMd2Doc(content, relativeUrl, env)
}