Skip to content

Commit

Permalink
allow styleLoaders config with only environment (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertho-zero authored and justin808 committed Dec 18, 2016
1 parent 09515c5 commit 7c51605
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. Items under

Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.

## [2.0.0.beta.18] - 2016-12-15
##### Fixed
- Allow `styleLoaders` config with only `env` config by [bertho-zero](https://github.com/bertho-zero).

## [2.0.0.beta.17] - 2016-12-04
##### Added
- Allow `styleLoaders` to depend on the environment variable `NODE_ENV` [#222](https://github.com/shakacode/bootstrap-loader/pull/222) by [bertho-zero](https://github.com/bertho-zero).
Expand Down Expand Up @@ -79,7 +83,8 @@ Changes from v1.1.1 to 2.0.0.beta.2

## [1.0.8]

[Unreleased]: https://github.com/shakacode/bootstrap-loader/compare/2.0.0-beta.17...master
[Unreleased]: https://github.com/shakacode/bootstrap-loader/compare/2.0.0-beta.18...master
[2.0.0.beta.18]: https://github.com/shakacode/bootstrap-loader/compare/2.0.0-beta.17...2.0.0-beta.18
[2.0.0.beta.17]: https://github.com/shakacode/bootstrap-loader/compare/2.0.0-beta.16...2.0.0-beta.17
[2.0.0.beta.16]: https://github.com/shakacode/bootstrap-loader/compare/2.0.0-beta.15...2.0.0-beta.16
[2.0.0.beta.15]: https://github.com/shakacode/bootstrap-loader/compare/2.0.0-beta.14...2.0.0-beta.15
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "bootstrap-loader",
"version": "2.0.0-beta.17",
"version": "2.0.0-beta.18",
"description": "Boostrap for Webpack",
"main": "loader.js",
"scripts": {
Expand Down Expand Up @@ -59,7 +59,7 @@
"babel-preset-es2015": "^6.18.0",
"babel-tape-runner": "^2.0.1",
"eslint": "^3.10.2",
"eslint-config-shakacode": "^13.1.0",
"eslint-config-shakacode": "13.1.0",
"eslint-plugin-import": "^2.2.0",
"extract-text-webpack-plugin": ">=2.0.0-beta",
"tap-spec": "^4.1.1",
Expand Down
3 changes: 2 additions & 1 deletion src/bootstrap.loader.js
Expand Up @@ -40,6 +40,7 @@ import buildExtractStylesLoader from './utils/buildExtractStylesLoader';
import createRequire from './utils/createRequire';
import logger from './utils/logger';
import fileExists from './utils/fileExists';
import getEnvProp from './utils/getEnvProp';
import createConfig from './bootstrap.config';

module.exports = function() {};
Expand Down Expand Up @@ -152,7 +153,7 @@ The package is 'bootstrap' for bootstrap v4 and 'bootstrap-sass' for v3.
const bootstrapConfig = JSON.stringify(config);
// Handle styles
if (config.styles) {
if (!config.styleLoaders) {
if (!getEnvProp('styleLoaders', config)) {
throw new Error(`
Could not find 'styleLoaders' in your config.
You can use default ones:
Expand Down

0 comments on commit 7c51605

Please sign in to comment.