diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f3ab5cc..7d39adad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). @@ -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 diff --git a/package.json b/package.json index 9eda26a3..35fb8bcc 100644 --- a/package.json +++ b/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": { @@ -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", diff --git a/src/bootstrap.loader.js b/src/bootstrap.loader.js index d4103d83..9ac484ba 100644 --- a/src/bootstrap.loader.js +++ b/src/bootstrap.loader.js @@ -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() {}; @@ -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: