Skip to content

Commit cf4f3c7

Browse files
committed
Update build scripts to include minified assets
1 parent 20d0df1 commit cf4f3c7

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Gruntfile.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ module.exports = function( grunt ) {
3131
'!plugin/**/._.DS_Store',
3232
'!plugin/**/.DS_Store',
3333
'!plugin/assets/css/src/**',
34+
'!plugin/assets/css/*.map',
3435
'!plugin/assets/js/.gitignore',
36+
'!plugin/assets/js/*.css',
37+
'!plugin/assets/js/*.map',
3538
'!plugin/assets/src/**',
3639
'!plugin/assets/images/png/**',
3740
'!plugin/assets/images/jpg/**',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"scripts": {
149149
"build": "npm-run-all build:*",
150150
"build:prepare": "grunt clean",
151-
"build:js": "wp-scripts build && NODE_ENV=dev wp-scripts build",
151+
"build:js": "NODE_ENV=dev wp-scripts build && wp-scripts build",
152152
"build:run": "grunt build",
153153
"build:zip": "grunt create-build-zip",
154154
"deploy": "npm run build && grunt deploy",

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ const getSharedConfig = packageType => {
209209
plugin.constructor.name
210210
)
211211
),
212-
new FixStyleOnlyEntriesPlugin(),
213212
new MiniCssExtractPlugin( {
214213
filename: `../css/[name]-compiled${
215214
packageType === 'theme' && PROD ? '.min' : ''
@@ -220,6 +219,7 @@ const getSharedConfig = packageType => {
220219
packageType === 'theme' && PROD ? '.min' : ''
221220
}-rtl.css`,
222221
} ),
222+
new FixStyleOnlyEntriesPlugin(),
223223
],
224224
resolve: {
225225
alias: {

0 commit comments

Comments
 (0)