Universal Development Toolkit for Javascript People
This update includes v2 of babel-runner
and babel-preset-dev-toolkit
since they were directly affected due to the switch to Babel 7.
updates templates to use correct webpack convention (rules
instead of loaders
)
This update adds a serverless template with additional support for the existing programmatic usage. If something isn't quite right, you will also get helpful errors which point out how the file should be written (that it needs to be a promise).
You are now able to specify an entry point for preRendering like so:
// Example of programmatic usage of dev-toolkit with a serverless-type application
require('dev-toolkit').default({
command: 'preRender',
options: {
// Use the function from the entry point instead of `preRender` from `src/server/index`
preRenderEntryPoint: path.resolve(process.cwd(), 'src/server/preRender'),
// silence any console logging
silent: true,
},
});
When an errors occured, dev-toolkit would log the error but not exit with the right error code.
It will now correctly exit with 1
when an error occurs.
Also updates to the latest webpack version as well as some other minor dependency updates.
In dev-toolkit.config.js
, an option has been added to prevent removing the previous build folder.
module.exports = {
devToolkit: { removeBuildFolder: false },
};
fixes warning DeprecationWarning: Tapable.plugin is deprecated. Use new API on
.hooks instead
When using NODE_ENV test
, dynamic import statements wouldn't work properly. The related babel-preset was being declared twice due to an if-condition in the react-app preset.
This release fixes that issue.
With the update to v7 of dev-toolkit, the API for dev-toolkit.config
has changed slightly.
The config key webpack.loaders
has changed to webpack.rules
.
See the with-sass
template or the changes from the PR.
Updating to the latest version of dev-toolkit should be quite straightforward, unless you have a lot of webpack-plugins. We have updated webpack to v4 which brings a number of under-the-hood improvements. There are also some things one needs to be aware of, I've listed them below.
The vulnerabilities that snyk is reporting on have not gone away completely, but they should as far as I know not be anything to worry about in the case of regular usage of dev-toolkit as a tool. Snyk reports them as low
vulnerabilities. They persist in the latest version of webpack (v4.5.0 right now) and it's impossible to make the warnings go away until the following issues have been resolved:
https://github.com/webpack/watchpack/issues/63
https://github.com/strongloop/fsevents/issues/187
If you are seeing warnings such as DeprecationWarning: Tapable.plugin is deprecated.
then you should know that several plugins or settings still emit those warnings and are also nothing to worry about. For more information please see this PR:
https://github.com/webpack/webpack/issues/6568
Adds support for jsx-control-statements
and make sure statements don't throw eslint-errors thanks to react/jsx-no-undef
.