File tree Expand file tree Collapse file tree 7 files changed +16690
-8
lines changed Expand file tree Collapse file tree 7 files changed +16690
-8
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ export default {
2525 components : true ,
2626
2727 // Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
28- buildModules : [ ] ,
28+ buildModules : [
29+ 'vue-notion/nuxt'
30+ ] ,
2931
3032 // Modules (https://go.nuxtjs.dev/config-modules)
3133 modules : [ ] ,
3234
3335 // Build Configuration (https://go.nuxtjs.dev/config-build)
34- build : {
35- transpile : [ "vue-notion" ] ,
36- } ,
36+ build : { } ,
3737} ;
Original file line number Diff line number Diff line change 1111 "dependencies" : {
1212 "core-js" : " ^3.6.5" ,
1313 "nuxt" : " ^2.14.12" ,
14- "prismjs" : " ^1.22.0" ,
15- "vue-notion" : " ^0.2.15"
14+ "prismjs" : " ^1.22.0"
1615 },
17- "devDependencies" : {}
16+ "devDependencies" : {
17+ "vue-notion" : " ^0.2.15"
18+ }
1819}
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+
2+ import path from 'path'
3+ // import defu from 'defu'
4+
5+ module . exports = function ( moduleOptions ) {
6+ // const options = defu({
7+ // ...this.options.notion,
8+ // ...moduleOptions
9+ // }, defaultOptions)
10+
11+ this . nuxt . hook ( 'build:before' , ( ) => {
12+ console . log ( 'this.options.build => ' , this . options . build )
13+
14+ // Enable transpilation of `src/` directory
15+ this . options . build . transpile . push ( 'vue-notion/src' )
16+
17+ console . log ( 'this.options.build after => ' , this . options . build )
18+
19+ this . addPlugin ( {
20+ src : path . resolve ( __dirname , 'plugin.js' ) ,
21+ mode : 'client' ,
22+ ssr : false ,
23+ fileName : 'vue-notion.client.js' ,
24+ // options
25+ } )
26+ } )
27+ }
28+
29+ module . exports . meta = require ( '../package.json' )
30+
31+ // export default NotionModule
32+
33+ //export const meta = require('../package.json')
Original file line number Diff line number Diff line change 1+ import Notion from 'vue-notion'
2+
3+ const NotionPlugin = ( context , inject ) => {
4+ const notion = Notion
5+ inject ( 'notion' , notion )
6+ }
7+
8+ export default NotionPlugin
Original file line number Diff line number Diff line change 99 "files" : [
1010 " dist/**/*.js" ,
1111 " dist/**/*.css" ,
12- " src/**/*.css"
12+ " src/**/*.css" ,
13+ " nuxt/*.js"
1314 ],
1415 "scripts" : {
1516 "serve" : " vue-cli-service serve dev/serve.js" ,
17+ "example" : " nuxt example" ,
1618 "build" : " cross-env NODE_ENV=production rollup --config build/rollup.config.js" ,
1719 "build:ssr" : " cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs" ,
1820 "build:es" : " cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es" ,
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments