Skip to content

Commit

Permalink
Inject webpack for access in your own projects when using custom config
Browse files Browse the repository at this point in the history
  • Loading branch information
zackify committed Apr 27, 2018
1 parent 9263965 commit 444b762
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/load-custom-config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//Load custom babel and webpack config
const webpack = require('webpack');

module.exports = () => {
let customConfig = {};
try {
customConfig = require(process.cwd() + '/gutenblock.config');
customConfig = require(process.cwd() + '/gutenblock.config')(webpack);
console.log('Using custom configuration');
} catch (e) {
console.log('Using default configuration');
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenblock",
"version": "0.5.2",
"version": "0.6.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 444b762

Please sign in to comment.