Skip to content

Instantly share code, notes, and snippets.

@Kronuz
Created July 11, 2018 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kronuz/ac406b1b43bcca7d44622a2db50f853b to your computer and use it in GitHub Desktop.
Save Kronuz/ac406b1b43bcca7d44622a2db50f853b to your computer and use it in GitHub Desktop.
module.exports = "Exported";
const gulp = require('gulp');
const webpack = require('webpack');
const webpackStream = require('webpack-stream');
const webpackConfig = require('./webpack.config');
gulp.task('default', () => {
return gulp.src('./app.js')
.pipe(webpackStream(webpackConfig, webpack))
.pipe(gulp.dest('dist/'));
});
{
"name": "assets-webpack-bug",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"assets-webpack-plugin": "3.8.4-alpha.0",
"gulp": "4.0.0",
"webpack": "4.12.0",
"webpack-cli": "3.0.6",
"webpack-merge": "4.1.3",
"webpack-stream": "4.0.3"
}
}
module.exports = {
mode: "development"
}
@Trainmaster
Copy link

@Kronuz The webpack configuration is missing the assets plugin:

const AssetsPlugin = require('assets-webpack-plugin');
// ...
plugins: [
  new AssetsPlugin(),
]

@Trainmaster
Copy link

I can reproduce the error running ./node_modules/.bin/gulp on Node.js version 8.11.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment