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 (
1313 this . cacheable && this . cacheable ( )
1414 this . callback (
1515 null ,
16- `module.exports = ${ generateCode ( source , parse ( this . resourceQuery ) ) } ` ,
16+ `export default ${ generateCode ( source , parse ( this . resourceQuery ) ) } ` ,
1717 sourceMap
1818 )
1919 } catch ( err ) {
@@ -42,9 +42,8 @@ function generateCode(source: string | Buffer, query: ParsedUrlQuery): string {
4242
4343 let code = ''
4444 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' ) } ')
4847}\n`
4948 return code
5049}
You can’t perform that action at this time.
0 commit comments