Answer the question
In order to leave comments, you need to log in
How to attach source map to webpack gulp?
Please tell me how to attach sourceMap to webpack-stream module for gulp
here is the task
const webpack = require('webpack-stream')
function scripts() {
return src(['app/js/*.js', '!app/js/*.min.js'])
.pipe(
webpack(
{
mode: 'production',
performance: {hints: false},
module: {
rules: [
{
test: /\.(js)$/,
exclude: /(node_modules)/,
loader: 'babel-loader',
query: {
presets: ['@babel/env'],
plugins: ["babel-plugin-root-import"]
}
}
]
},
}
)
// .pipe(sourcemaps.init({loadMaps: true}))
).on('error', function handleError() {
this.emit('end')
})
// .pipe(sourcemaps.write('.'))
.pipe(rename('app.min.js'))
.pipe(dest('app/js'))
.pipe(browserSync.stream())
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question