File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,7 @@ function nuxtSocket(ioOpts) {
104104 Object . prototype . hasOwnProperty . call ( watchProp , '__ob__' )
105105 ) {
106106 const errMsg =
107- emitBack +
108- ' is a vuex module. You probably want to watch its properties'
107+ `${ emitBack } is a vuex module. You probably want to watch its properties`
109108 throw new Error ( errMsg )
110109 }
111110 return watchProp
Original file line number Diff line number Diff line change 22import fs from 'fs'
33import template from 'lodash/template'
44import { Nuxt , Builder } from 'nuxt'
5+ import serialize from 'serialize-javascript'
56import config from '@/nuxt.config'
67import { IOServer } from '@/server/io'
78
@@ -11,8 +12,8 @@ const oneMinute = 60 * oneSecond
1112export async function compilePlugin ( { src, tmpFile, options } ) {
1213 const content = fs . readFileSync ( src , 'utf-8' )
1314 try {
14- const compiled = template ( content )
15- const pluginJs = compiled ( { options } )
15+ const compiled = template ( content , { interpolate : / < % = ( [ \s \S ] + ? ) % > / g } )
16+ const pluginJs = compiled ( { options, serialize } )
1617 fs . writeFileSync ( tmpFile , pluginJs )
1718 const { default : Plugin , pOptions } = await import ( tmpFile ) . catch ( ( err ) => {
1819 throw new Error ( 'Err importing plugin: ' + err )
You can’t perform that action at this time.
0 commit comments