G
G
GAS-ART2022-01-22 22:05:45
gulp.js
GAS-ART, 2022-01-22 22:05:45

How to upload uncompressed js code to production in gulp using webpack plugin?

How to upload uncompressed js code to production in gulp using webpack plugin? It is desirable to get the code itself clean, which cannot be achieved in the production version of the webpack. The file will be compressed on the server using the php framework, and I need to insert a human-readable source there, and then compress it.

My connection design is extremely simple:

.pipe(webpack({
         mode: 'production',
         output: {
            filename: 'app.min.js'
         },
         externals: {
            jquery: 'jQuery'
         }
      }))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GAS-ART, 2022-01-23
@Gavr_Gavr

Found, you need to add to webpack:

optimization: {
            minimize: false
         }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question