This is the most annoying problem. I've run into this before here, however I have the same setup in my webpack config and gulp and I cannot set breakpoints correctly in the Chrome Devtools.
I've deleted my app file and map, re-run gulp webpack
which auto-generates it again, and it still does not break where I want too in the app :(
Webpack config
var webpack = require('webpack');
var PROD = JSON.parse(process.env.PROD_DEV || '0');
// https://stackoverflow.com/questions/25956937/how-to-build-minified-and-uncompressed-bundle-with-webpack
module.exports = {
entry: "./entry.js",
devtool: "source-map",
output: {
devtoolLineToLine: true,
sourceMapFilename: "tickertags.bundle.js.map",
pathinfo: true,
path: __dirname,
filename: PROD ? "tickertags.bundle.min.js" : "tickertags.bundle.js"
},
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" }
]
},
plugins: PROD ? [
new webpack.optimize.UglifyJsPlugin({ minimize: true })
] : []
};
Gulp tasks
gulp.task('webpack',['build:html-templates'],function() {
return gulp.src('entry.js')
.pipe(webpack( require('./webpack.config.js') ))
.pipe(gulp.dest('app/assets/js'));
});
// Development watch /////////////////////////////////////////////////////////// ☕️⏎→
gulp.task('watch', function() {
gulp.watch('app/**/**/*.html', ['build:html-templates']).on('change', function(file) {
var filePath = file.path.split(rootPath);
process.stdout.write(gutil.colors.red(' →→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→ ' +filePath[1]+ '\n'));
});
gulp.watch('app/assets/imgs/*.svg').on('change', function(file) {
var filePath = file.path.split(rootPath);
process.stdout.write(gutil.colors.red(' →→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→ ' +filePath[1]+ '\n'));
});
gulp.watch('sass-smacss/sass/**/*.scss', ['app-css']).on('change', function(file) {
var filePath = file.path.split(rootPath);
process.stdout.write(gutil.colors.red(' →→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→ ' +filePath[1]+ '\n'));
});
gulp.watch(paths.scripts, ['webpack']).on('change', function(file) {
var filePath = file.path.split(rootPath);
process.stdout.write(gutil.colors.red(' →→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→ ' +filePath[1]+ '\n'));
});
});
gulp.task('default', ['watch', 'webpack']);