Commit 5d7e3c98 authored by Stanislav Fifik's avatar Stanislav Fifik

activating sourcemaps

parent 5d10ff05
"use strict"; "use strict";
console.log(require.paths);
var source = require('vinyl-source-stream'), var source = require('vinyl-source-stream'),
buffer = require('vinyl-buffer'), buffer = require('vinyl-buffer'),
eventStream = require('event-stream'), eventStream = require('event-stream'),
...@@ -74,6 +77,7 @@ module.exports = { ...@@ -74,6 +77,7 @@ module.exports = {
argv.watch = true; argv.watch = true;
gulp.run('build'); gulp.run('build');
}); });
console.log(gulp);
}, },
css: function(name, entryPoints, destination) { css: function(name, entryPoints, destination) {
...@@ -107,18 +111,19 @@ module.exports = { ...@@ -107,18 +111,19 @@ module.exports = {
publicPath: config.publicPath || '/css/', publicPath: config.publicPath || '/css/',
}, },
target: 'web', target: 'web',
devtool: argv.production ? 'eval-cheap-module-source-map' : 'source-map',
watch: argv.watch, watch: argv.watch,
module: { module: {
loaders: [ loaders: [
{ {
test: /\.css$/, test: /\.css$/,
loader: $webpack.ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' }) loader: $webpack.ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader?sourceMap' })
}, },
{ {
test: /\.less$/, test: /\.less$/,
loader: $webpack.ExtractTextPlugin.extract({ loader: $webpack.ExtractTextPlugin.extract({
fallback: 'style-loader', fallback: 'style-loader',
use: 'css-loader!less-loader' use: 'css-loader?sourceMap!less-loader?sourceMap'
}) })
}, },
{ {
...@@ -174,13 +179,13 @@ module.exports = { ...@@ -174,13 +179,13 @@ module.exports = {
filename: '[name].js', filename: '[name].js',
publicPath: config.publicPath || '/js', publicPath: config.publicPath || '/js',
}, },
devtool: argv.production ? 'eval-cheap-module-source-map' : 'source-map',
target: 'web', target: 'web',
watch: argv.watch, watch: argv.watch,
module: { module: {
rules: [ rules: [
{ {
test: /\.jsx?$/, test: /\.jsx?$/,
include: module.exports.BABEL_NPM_MODULES.map((lib) => new RegExp(`node_modules/${lib}`)),
use: { use: {
loader: 'babel-loader', loader: 'babel-loader',
options: module.exports.BABEL_CONFIG options: module.exports.BABEL_CONFIG
......
{ {
"name": "designeo-gulp", "name": "designeo-gulp",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "Simple drop-in preconfigured gulp for designeo projects",
"main": "index.js", "main": "index.js",
"scripts": { "author": "Stanislav. Fifik <stanislav.fifik@designeo.cz>",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"babel-core": "^6.24.1", "babel-core": "^6.24.1",
...@@ -41,10 +38,10 @@ ...@@ -41,10 +38,10 @@
"url-loader": "^0.5.8", "url-loader": "^0.5.8",
"vinyl-buffer": "^1.0.0", "vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0", "vinyl-source-stream": "^1.1.0",
"vue": "^2.0.0", "vue": "2.3.3",
"vue-loader": "^12.0.4", "vue-loader": "^12.2.1",
"vue-template-compiler": "^2.0.0", "vue-template-compiler": "2.3.3",
"webpack": "^2.6.0", "webpack": "^3.0.0",
"yargs": "^8.0.1" "yargs": "^8.0.1"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment