1
- const path = require ( "path" ) ;
2
- const FilterWarningsPlugin = require ( "webpack-filter-warnings-plugin" ) ;
1
+ const path = require ( "path" )
2
+ const FilterWarningsPlugin = require ( "webpack-filter-warnings-plugin" )
3
3
4
4
exports . onCreateWebpackConfig = ( { actions } ) => {
5
5
actions . setWebpackConfig ( {
6
6
plugins : [
7
7
new FilterWarningsPlugin ( {
8
- exclude :
9
- / m i n i - c s s - e x t r a c t - p l u g i n [ ^ ] * C o n f l i c t i n g o r d e r . F o l l o w i n g m o d u l e h a s b e e n a d d e d : / ,
8
+ exclude : / m i n i - c s s - e x t r a c t - p l u g i n [ ^ ] * C o n f l i c t i n g o r d e r . F o l l o w i n g m o d u l e h a s b e e n a d d e d : / ,
10
9
} ) ,
11
10
] ,
12
- } ) ;
13
- } ;
11
+ } )
12
+ }
14
13
15
14
exports . createSchemaCustomization = ( { actions } ) => {
16
15
const blogSchema = require ( "./src/schema/blogSchema" )
@@ -25,7 +24,6 @@ exports.createSchemaCustomization = ({ actions }) => {
25
24
26
25
const { createTypes } = actions
27
26
const typeDefs =
28
- blogSchema . value +
29
27
blogSchema . value +
30
28
caseSchema . value +
31
29
globalSeoSchema . value +
@@ -64,7 +62,7 @@ exports.createPages = async ({ graphql, actions }) => {
64
62
component : BlogDetail ,
65
63
context : {
66
64
slug : node . slug ,
67
- lastmod : node . updated_at
65
+ lastmod : node . updated_at ,
68
66
} ,
69
67
} )
70
68
} )
@@ -88,14 +86,14 @@ exports.createPages = async ({ graphql, actions }) => {
88
86
reporter . panicOnBuild ( "Error creando paginas de landing" )
89
87
}
90
88
91
- const landings = LandingQueryData . allStrapiLandingPage . nodes ;
89
+ const landings = LandingQueryData . allStrapiLandingPage . nodes
92
90
93
91
function getUrl ( node ) {
94
92
if ( ! node ) return ""
95
93
96
94
if ( node . parent_page ) {
97
- const parentPage = landings . find ( ( landing ) =>
98
- landing . slug === node . parent_page . slug
95
+ const parentPage = landings . find (
96
+ landing => landing . slug === node . parent_page . slug
99
97
)
100
98
const parentUrl = getUrl ( parentPage )
101
99
return `${ parentUrl } /${ node . slug } `
@@ -113,7 +111,7 @@ exports.createPages = async ({ graphql, actions }) => {
113
111
component : LandingPage ,
114
112
context : {
115
113
slug : node . slug ,
116
- lastmod : node . updated_at
114
+ lastmod : node . updated_at ,
117
115
} ,
118
116
} )
119
117
} )
0 commit comments