Using BUILD_PATH environment variable with webpack
This commit is contained in:
parent
9aaf1827ca
commit
9630b26ed3
@ -1,6 +1,6 @@
|
|||||||
var path = require('path'),
|
var path = require('path'),
|
||||||
_ = require('lodash'),
|
_ = require('lodash'),
|
||||||
buildRoot = process.env.BUILD_PATH || './build',
|
buildRoot = process.env.BUILD_PATH || path.join(__dirname, './build'),
|
||||||
buildPath = _.bind(path.join, path, buildRoot);
|
buildPath = _.bind(path.join, path, buildRoot);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
var webpack = require('webpack'),
|
var webpack = require('webpack'),
|
||||||
bourbon = require('bourbon');
|
bourbon = require('bourbon'),
|
||||||
|
config = require('./config');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
@ -9,7 +10,7 @@ module.exports = {
|
|||||||
'__discard__/css/svg.css.js': './src/sass/svg.scss'
|
'__discard__/css/svg.css.js': './src/sass/svg.scss'
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: __dirname + '/build',
|
path: config.buildRoot,
|
||||||
filename: '[name]'
|
filename: '[name]'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
Loading…
Reference in New Issue
Block a user