File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,9 @@ module.exports = function (grunt) {
167
167
} , moduleEntryPoints ) ,
168
168
output : {
169
169
path : __dirname + "/build/prod" ,
170
+ filename : chunkData => {
171
+ return chunkData . chunk . name === "main" ? "assets/[name].js" : "[name].js" ;
172
+ } ,
170
173
globalObject : "this"
171
174
} ,
172
175
resolve : {
@@ -294,8 +297,8 @@ module.exports = function (grunt) {
294
297
// Add Structured Data for SEO
295
298
content = content . replace ( "</head>" ,
296
299
"<script type='application/ld+json'>" +
297
- JSON . stringify ( grunt . file . read ( "src/web/static/structuredData.json" ) ) +
298
- "</script>" ) ;
300
+ JSON . stringify ( JSON . parse ( grunt . file . read ( "src/web/static/structuredData.json" ) ) ) +
301
+ "</script></head> " ) ;
299
302
return grunt . template . process ( content , srcpath ) ;
300
303
} else {
301
304
return content ;
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ module.exports = {
48
48
"process.browser" : "true"
49
49
} ) ,
50
50
new MiniCssExtractPlugin ( {
51
- filename : "[name].css"
51
+ filename : "assets/ [name].css"
52
52
} ) ,
53
53
] ,
54
54
resolve : {
@@ -80,15 +80,25 @@ module.exports = {
80
80
{
81
81
test : / \. c s s $ / ,
82
82
use : [
83
- MiniCssExtractPlugin . loader ,
83
+ {
84
+ loader : MiniCssExtractPlugin . loader ,
85
+ options : {
86
+ publicPath : "../"
87
+ }
88
+ } ,
84
89
"css-loader" ,
85
90
"postcss-loader" ,
86
91
]
87
92
} ,
88
93
{
89
94
test : / \. s c s s $ / ,
90
95
use : [
91
- MiniCssExtractPlugin . loader ,
96
+ {
97
+ loader : MiniCssExtractPlugin . loader ,
98
+ options : {
99
+ publicPath : "../"
100
+ }
101
+ } ,
92
102
"css-loader" ,
93
103
"sass-loader" ,
94
104
]
@@ -97,7 +107,9 @@ module.exports = {
97
107
test : / \. ( i c o | e o t | t t f | w o f f | w o f f 2 ) $ / ,
98
108
loader : "url-loader" ,
99
109
options : {
100
- limit : 10000
110
+ limit : 10000 ,
111
+ name : "[hash].[ext]" ,
112
+ outputPath : "assets"
101
113
}
102
114
} ,
103
115
{
@@ -120,7 +132,9 @@ module.exports = {
120
132
exclude : / w e b \/ s t a t i c / ,
121
133
loader : "url-loader" ,
122
134
options : {
123
- limit : 10000
135
+ limit : 10000 ,
136
+ name : "[hash].[ext]" ,
137
+ outputPath : "assets"
124
138
}
125
139
} ,
126
140
]
You can’t perform that action at this time.
0 commit comments