Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Split up the minify preset #815

Merged
merged 1 commit into from
Apr 24, 2018
Merged

Split up the minify preset #815

merged 1 commit into from
Apr 24, 2018

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Apr 24, 2018

@@ -2,32 +2,42 @@ import test from 'ava';
import { Neutrino } from 'neutrino';

const mw = () => require('..');
const prodEnv = { 'env': { NODE_ENV: 'production' } };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the string from the env key.

@@ -2,32 +2,42 @@ import test from 'ava';
import { Neutrino } from 'neutrino';

const mw = () => require('..');
const prodEnv = { 'env': { NODE_ENV: 'production' } };
const devEnv = { 'env': { NODE_ENV: 'development' } };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the string from the env key.

* Removes the web preset's dependency on `@neutrinojs/image-minify`
  since it has many heavyweight native code dependencies, and isn't
  enabled by default anyway (see #713).
* Removes the library preset's dependency on `@neutrinojs/style-minify`
  and `@neutrinojs/image-minify` (fixes #807).
* Removes the `@neutrinojs/minify` preset in favour of directly
  depending on the individual `@neutrinojs/*-minify` presets.
* Adds an `enabled` option to `@neutrinojs/image-minify` that defaults
  to production only, to allow for string form usage of the preset in
  `.neutrinorc.js`, without the need to specify a `.when()`.
@edmorley edmorley merged commit bfb0ee2 into neutrinojs:master Apr 24, 2018
@edmorley edmorley deleted the separate-image-minify branch April 24, 2018 17:44
@eliperelman
Copy link
Member

I think this also fixes #670 in master.

@edmorley
Copy link
Member Author

Though presumably anyone who explicitly adds the @neutrinojs/image-minify preset will still be affected?

@eliperelman
Copy link
Member

Correct.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants