File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed
Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change 11const { resolve } = require ( 'path' )
22
33module . exports = function ( moduleOptions ) {
4- const options = {
5- authModule : false ,
6- connectOnLogin : true ,
7- disconnectOnLogout : true ,
8- ...this . options . echo ,
9- ...moduleOptions
10- }
4+ this . nuxt . hook ( 'builder:extendPlugins' , ( plugins ) => {
5+ const options = {
6+ authModule : false ,
7+ connectOnLogin : true ,
8+ disconnectOnLogout : true ,
9+ ...this . options . echo ,
10+ ...moduleOptions
11+ }
1112
12- this . addPlugin ( {
13- ssr : false ,
14- src : resolve ( __dirname , 'plugin.js' ) ,
15- fileName : 'echo.js' ,
16- options
13+ const { dst } = this . addTemplate ( {
14+ ssr : false ,
15+ src : resolve ( __dirname , 'plugin.js' ) ,
16+ fileName : 'echo.js' ,
17+ options
18+ } )
19+
20+ plugins . push ( resolve ( this . options . buildDir , dst ) )
1721 } )
1822}
1923
You can’t perform that action at this time.
0 commit comments