![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
webpack-isomorphic-compiler
Advanced tools
Readme
A compiler that makes your life easier if you are building isomorphic webpack powered apps, that is, single page applications with server-side rendering.
$ npm install webpack-isomorphic-compiler --save-dev
The current version works with webpack v2, v3 and v4.
With webpack, client-side applications with server-side rendering means compiling both the client and the server.
To make it right, the client and server compilers must be in sync and live in perfect harmony.
Webpack offers a multi-compiler that makes this possible, but unfortunately it doesn't have all the plugin handlers that a single compiler does. This makes it difficult to know what's happening under the hood.
This module packs an aggregated compiler that:
NOTE: While webpack-sane-compiler-reporter
is compatible with this compiler, we advise using webpack-isomorphic-compiler-reporter instead for completeness and accurateness.
const webpack = require('webpack');
const isomorphicWebpack = require('webpack-isomorphic-compiler');
const clientCompiler = webpack(/* client config */);
const serverCompiler = webpack(/* server config */);
const compiler = isomorphicWebpack(clientCompiler, serverCompiler);
Alternatively, you may pass a config directly instead of a webpack compiler:
const webpack = require('webpack');
const compiler = isomorphicWebpack(/* client config */, /* server config */);
The returned compiler
has exactly the same API as the webpack-sane-compiler but adds some functionality that is detailed below.
The compilation result, available through .run()
, .watch()
, .getCompilation()
and .resolve()
, has two more properties:
compiler.run()
.then(({ clientStats, serverStats, stats, duration }) => {
// clientStats is the webpack stats of the client
// serverStats is the webpack stats of the client
// duration is the aggregated compilation duration
// stats maps to clientStats for API compatibility
})
Both client
and server
properties contain their webpack configs & compilers.
Name | Description | Type |
---|---|---|
webpackCompiler | The client's webpack compiler | Compiler |
webpackConfig | The client's webpack config | object |
Accessing webpack compiler public methods is NOT allowed and will throw an error.
You may also want to look at:
$ npm test
$ npm test -- --watch
during development
FAQs
A compiler that makes your life easier if you are building isomorphic webpack powered apps, that is, single page applications with server-side rendering
The npm package webpack-isomorphic-compiler receives a total of 224 weekly downloads. As such, webpack-isomorphic-compiler popularity was classified as not popular.
We found that webpack-isomorphic-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 18 open source maintainers 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.