File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const loader: webpack.loader.Loader = function (
13
13
this . cacheable && this . cacheable ( )
14
14
this . callback (
15
15
null ,
16
- `module.exports = ${ generateCode ( source , parse ( this . resourceQuery ) ) } ` ,
16
+ `export default ${ generateCode ( source , parse ( this . resourceQuery ) ) } ` ,
17
17
sourceMap
18
18
)
19
19
} catch ( err ) {
@@ -42,9 +42,8 @@ function generateCode(source: string | Buffer, query: ParsedUrlQuery): string {
42
42
43
43
let code = ''
44
44
code += `function (Component) {
45
- Component.options.__i18n = Component.options.__i18n || []
46
- Component.options.__i18n.push('${ value . replace ( / \u0027 / g, '\\u0027' ) } ')
47
- delete Component.options._Ctor
45
+ Component.__i18n = Component.__i18n || []
46
+ Component.__i18n.push('${ value . replace ( / \u0027 / g, '\\u0027' ) } ')
48
47
}\n`
49
48
return code
50
49
}
You can’t perform that action at this time.
0 commit comments