File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
- module . exports = function chainWebpack ( config ) {
2
- config . resolve . alias . set ( "vue$" , "vue/dist/vue.esm.js" ) ;
1
+ const path = require ( "path" ) ;
2
+
3
+ module . exports = options => {
4
+ const layoutPath = options . layout || path . resolve ( __dirname , "./layout.vue" ) ;
5
+ return function ( config ) {
6
+ config . resolve . alias
7
+ . set ( "vue$" , "vue/dist/vue.esm.js" )
8
+ . set ( "vuepress-plugin-live/live-layout" , layoutPath ) ;
9
+ } ;
3
10
} ;
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ const chainWebpack = require("./chainWebpack");
2
2
const enhanceAppFiles = require ( "./enhanceAppFiles" ) ;
3
3
const chainMarkdown = require ( "./markDownPlugin" ) ;
4
4
5
- module . exports = ( ) => {
5
+ module . exports = ( options , app , plugin ) => {
6
6
return {
7
7
name : "vuepress-plugin-live" ,
8
- chainWebpack,
8
+ chainWebpack : chainWebpack ( options ) ,
9
9
enhanceAppFiles,
10
10
chainMarkdown
11
11
} ;
Original file line number Diff line number Diff line change 1
- import layout from "./ layout.vue " ;
1
+ import layout from "vuepress-plugin-live/live- layout" ;
2
2
3
3
// vuepress is compiled in both node and non-node models
4
4
// it needs a "global" variable to make buble work.
You can’t perform that action at this time.
0 commit comments