mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-18 10:59:10 +08:00
fix: update md-loader
This commit is contained in:
parent
21f459d197
commit
bb890a99b2
@ -27,10 +27,15 @@ function pad(source) {
|
||||
.join('\n')
|
||||
}
|
||||
|
||||
const templateReplaceRegex = /<template>([\s\S]+)<\/template>/g
|
||||
function genInlineComponentText(template, script) {
|
||||
// https://github.com/vuejs/vue-loader/blob/423b8341ab368c2117931e909e2da9af74503635/lib/loaders/templateLoader.js#L46
|
||||
let source = template
|
||||
if (templateReplaceRegex.test(source)) {
|
||||
source = source.replace(templateReplaceRegex, '$1')
|
||||
}
|
||||
const finalOptions = {
|
||||
source: `<div>${template}</div>`,
|
||||
source: `<div>${source}</div>`,
|
||||
filename: 'inline-component', // TODO:这里有待调整
|
||||
compiler: TemplateCompiler,
|
||||
compilerOptions: {
|
||||
|
Loading…
Reference in New Issue
Block a user