File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ module.exports = function markdownToVueLoader(source, map) {
132
132
const $html = cheerio . load ( $code . text ( ) , cheerioLoadOptions ) ;
133
133
const $style = $html ( 'style' ) ;
134
134
135
- component = $html ( 'script' ) . html ( ) || 'module.exports = {};' ;
135
+ component = $html ( 'script' ) . html ( ) || 'export default {};' ;
136
136
scoped = $style . attr ( 'scoped' ) ;
137
137
style = $style . html ( ) ;
138
138
template = $html ( 'template' ) . html ( ) ;
@@ -145,7 +145,7 @@ module.exports = function markdownToVueLoader(source, map) {
145
145
const $script = $html ( 'script' ) ;
146
146
const $style = $html ( 'style' ) ;
147
147
148
- component = $script . html ( ) || 'module.exports = {};' ;
148
+ component = $script . html ( ) || 'export default {};' ;
149
149
scoped = $style . attr ( 'scoped' ) ;
150
150
style = $style . html ( ) ;
151
151
$script . remove ( ) ;
@@ -256,7 +256,7 @@ module.exports = function markdownToVueLoader(source, map) {
256
256
257
257
if ( options . exportSource || components . length > 0 ) {
258
258
$body . append ( `<script>
259
- module.exports = {
259
+ export default {
260
260
${ options . exportSource ? `source: ${ JSON . stringify ( markdown . utils . escapeHtml ( source ) ) } ,` : '' }
261
261
${ components . length > 0 ? `components: {${ components . join ( ) } }` : '' }
262
262
};
You can’t perform that action at this time.
0 commit comments