
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
nuxt-build-optimisations
Advanced tools
Instantly speed up your Nuxt.js 2 build time.
Nuxt Build Optimisations is for modern, sluggish Nuxt.js 2 apps.
It makes smart assumptions about trade-offs you're willing to make for better build speeds.
Under the hood it modifies your Nuxt config and the underlying webpack config.
:warning: This module is experimental. You need to test your app with it before it hits production.
Development
file-loader
for quicker builds (safe)Production
Misc
Install using yarn or npm. (Nuxt.js 2.10+ is required)
yarn add nuxt-build-optimisations
Within your nuxt.config.js
add the following.
// nuxt.config.js
buildModules: [
'nuxt-build-optimisations',
],
To enable the measure plugin, you can use an environment variable or follow the documentation below.
package.json
{
"scripts": {
"measure": "export NUXT_MEASURE=true; nuxt dev"
}
}
Configuration is under the buildOptimisations key in your nuxt.config.js.
Default Configuration
buildOptimisations: {
profile: 'risky'
}
Type: boolean
or object
Default: false
When measure is enabled with true (options or environment variable), it will use the speed-measure-webpack-plugin
.
If the measure option is an object it is assumed to be speed-measure-webpack-plugin options.
buildOptimisations: {
measure: {
outputFormat: 'humanVerbose',
granularLoaderData: true,
loaderTopFiles: 10
}
}
Type: risky
| experimental
| safe
| false
Default: risky
If you have errors on the risky
mode you should increment down in profiles until you find one that works.
Setting the profile to false will disable the optimisations, useful when you want to measure your build time without optimisations.
Development only
Swaps url-loader
for file-loader
. Faster when you have a lot of images of varying sizes.
Tradeoff: can't test url-loaded images in dev
Specific webpack flags changed based on best practices described in the documentation.
Tradeoff: See webpack docs
Development only
Makes sure all Nuxt minimising is disabled to speed up builds, including js and html.
Development only
Modern builds are disabled by default as the main client build works the same.
For development will only transpile code to the latest chrome for a ~40% quicker compile.
In production transpiles code for non-dead browsers. Nuxt out of the box transpiles to IE9. See: https://github.com/browserslist/browserslist#full-list
Nuxt cache option enabled
Development only
Removes any transpiling of third party libraries.
Nuxt hardSource enabled
Nuxt parallel enabled
FAQs
Nuxt.js v2 module to automatically make your builds faster.
The npm package nuxt-build-optimisations receives a total of 696 weekly downloads. As such, nuxt-build-optimisations popularity was classified as not popular.
We found that nuxt-build-optimisations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.