You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Couldn't be simpler. However, in the resulting bundle.js, vue is not not only ignored, the import directive is left in as well, causing browsers to choke on it. Output is like so:
[17:17:53] Using gulpfile d:\test\gulpfile.js
[17:17:53] Starting 'build'...
[17:17:53] Version: webpack 1.14.0
Asset Size Chunks Chunk Names
bundle.js 1.56 kB 0 [emitted] main
bundle.js.map 1.79 kB 0 [emitted] main
[17:17:53] Finished 'build' after 216 ms
So Vue was never bundled. Why?
The text was updated successfully, but these errors were encountered:
It looks like webpack-stream is not compatible with webpack2 using the default settings. I found success fixing this issue by following the instructions here and explicitly passing the webpack2 instance to webpack-stream like this:
var gulp = require('gulp');
var webpackStream = require('webpack-stream');
var webpack2 = require('webpack');
gulp.task('default', function() {
return gulp.src('src/entry.js')
.pipe(webpackStream({/* options */}, webpack2))
.pipe(gulp.dest('dist/'));
});
When calling webpack from gulp, imported node modules are ignored. When I call webpack from the commandline, node modules are bundled absolutely fine.
In my script, I'm simply including
import Vue from 'vue';
after having done anpm i --save vue
. Then, in my webpack.config.js:When I run
webpack
(just like that) it bundles vue with my index.js. Life's good. Output is like so:Looks good.
Now, I install webpack-stream. And include this in my Gulpfile:
Couldn't be simpler. However, in the resulting bundle.js, vue is not not only ignored, the import directive is left in as well, causing browsers to choke on it. Output is like so:
So Vue was never bundled. Why?
The text was updated successfully, but these errors were encountered: