Skip to content

Commit

Permalink
webpackをgulpで動くように設定
Browse files Browse the repository at this point in the history
  • Loading branch information
jolikecat committed Mar 10, 2022
1 parent d610481 commit 3d4bcd8
Show file tree
Hide file tree
Showing 4 changed files with 420 additions and 29 deletions.
19 changes: 8 additions & 11 deletions gulpfile.js/tasks/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ const paths = require('./paths');

const { src, dest } = require('gulp');
const path = require('path');
const babel = require('gulp-babel');
const webpack = require('webpack');
const webpackStream = require('webpack-stream');
const webpackConfig = require('../../webpack.config.js');

module.exports = function gulpBabel() {
return (
src(paths.src.js)
.pipe(babel(
{
presets: ['@babel/env']
}
))
.pipe(dest(path.join(paths.dist.root, 'assets/scripts/')))
);
module.exports = function gulpScript() {
return webpackStream(webpackConfig, webpack).on('error', function (e) {
this.emit('end');
})
.pipe(dest(path.join(paths.dist.root, 'assets/scripts/')))
};

0 comments on commit 3d4bcd8

Please sign in to comment.