Questions tagged [gulp-webpack]

Gulp-webpack allows you to import your Webpack config into a Gulp task. This lets you use Webpack's modules feature.

Webpack https://webpack.github.io/

Gulp-webpack https://www.npmjs.com/package/gulp-webpack

return gulp.src('src/entry.js')
    .pipe(webpack( require('./webpack.config.js') ))
    .pipe(gulp.dest('dist/'));
15 questions
5
votes
2 answers

gulp-webpack error: Entry module not found: Error: cannot resolve module 'babel'

I keep getting this issue when trying to use gulp-webpack to transpile jsx / js to browser level. I have updated both NPM and nodeJS to the current latest versions (3.8.9 and 6.1.0) The error it outputs is: ERROR in Entry module not found: Error:…
NealVDV
  • 1,812
  • 1
  • 20
  • 44
5
votes
0 answers

Assembling the typescript with gulp-webpack

There is a test-project, its structure: it is files * .ts: ////// greeter.ts import {ActionsCollection} from "./actionsCollection"; class Greeter extends ActionsCollection{ } var greeter = new Greeter(); alert(greeter.greet("Hello,…
sanu0074
  • 488
  • 7
  • 26
3
votes
1 answer

Sourcemap generated from Gulp, not working as expected

So my app is running off a concatenated admin.bundle.js file. I'm using webpack to manage the modules, and then using gulp-webpack to import my webpack config, then run the sourcemap code: gulp.task('webpack', function() { return…
Leon Gaban
  • 27,845
  • 80
  • 281
  • 473
2
votes
0 answers

gulp-nodemon onChange event triggered twice

I'm trying to set my project's gulp tasks in order and this how my gulpfile.js code looks currently: var gulp = require('gulp'), nodemon = require('gulp-nodemon'), webpack = require('gulp-webpack'); gulp.task('nodemon', ['webpack'],…
arhonthhh
  • 197
  • 9
1
vote
0 answers

Webpack looking for loaders in the wrong directory?

I am running webpack from webpack-stream. Consider the following code gulp.task("scripts", () => { return gulp .src("./app/assets/scripts/App.js") .pipe( gulpWebpack( { output: { filename: "bundle.js" …
Unity Hour
  • 498
  • 6
  • 19
1
vote
0 answers

Strange behaviour when using webpack-stream with gulp

I've run into an issue whilst loosely following along the gulp, webpack(stream) examples, where I'm getting this strange error: node_modules\webpack-stream\node_modules\webpack\lib\ProgressPlugin.js:12 const defaultHandler = (percentage, msg,…
geostocker
  • 1,080
  • 13
  • 26
1
vote
2 answers

webpack is not defined - gulp - but IS defined

I'm using Gulp and webpack, I imported both webpack and webpack-stream in my gulpfile.js but for some reason the console says webpack is not defined my gulp import are correct : var webpack = require('webpack'); var webpackStream =…
K3nzie
  • 411
  • 1
  • 6
  • 17
1
vote
1 answer

Webpack vs gulp-webpack

I'm trying to task webpack from gulp to process a directory that contains .js files. I'm using gulp-webpack 1.5.0. Gulp task is defined as: return gulp.src(joinPath(config.aliasify.dest, 'index.js')) .pipe(webpack(…
Olivier MATROT
  • 3,763
  • 4
  • 37
  • 66
0
votes
0 answers

Uncaught TypeError: Cannot read property 'call' of undefined when import from node_modules

When I import to page.js from node_modules like import 'lightgallery/dist/js/lightgallery-all.min'; webpack throws me Uncaught TypeError: Cannot read property 'call' of undefined. Import from local modules works fine. That's how it looks:…
Epitaph
  • 1
  • 6
0
votes
0 answers

Dynamic import from node_modules throws "Cannot read property 'call' of undefined"

Webpack-stream version: 5.2.1 npm version: 6.14.4 node version: v10.13.0 platform: windows10 I use gulp + webpack-stream for two modules: libraries.js and page.js The problem relates only to the import from node_modules to page.js, the same import…
Epitaph
  • 1
  • 6
0
votes
0 answers

webpack react development mode

I am not able to configure Webpack with react in development mode. Here is my package JSON : ... "devDependencies": { "babel-core": "^6.26.3", "babel-loader": "^7.1.4", "babel-preset-es2015": "^6.24.1", "gulp": "^4.0.0", …
0
votes
1 answer

Is it possible to lookup a js module in 2 different folders while priortizing one over the other?

I need to create a highly customizable webapp and wondered if and how it is possible to make use of es6 module loading in combination with webpack to override single files of a bigger app-stack. So lets assume i have a directory structure…
Philipp Wrann
  • 1,471
  • 2
  • 14
  • 21
0
votes
1 answer

gulp-webpack can't resolve node modules

building a modern Angular app here. I am using gulp-webpack for fast development builds. I need webpack for my typescript bundling because I am obviously relying on some node modules. But weirdly enough, gulp-webpack doesn't seem to be automatically…
tcmoore
  • 1,071
  • 1
  • 12
  • 29
0
votes
1 answer

Webpackstream issues with babel-loader

I have a setup running for fine for Mac, but the same setup seems to fail on Windows. The babel-loader doesn't seem to do anything. Here is my current setup: Error code description package.json "devDependencies": { "babel-core": "^5.8.23", …
0
votes
1 answer

Gulp-Webpack Loaders returning loader source code?

Newbie. I'm setting up gulp-webpack to run in a Gulp task, and I'm starting simple by processing a test "less" file. I npm-installed gulp-webpack, webpack, and also the webpack loaders less-loader, css-loader, and style-loader. For some reason, my…
Ted Fitzpatrick
  • 742
  • 4
  • 14