Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@marko/build
Advanced tools
Utility to build a node server from a marko file
npm install @marko/build
marko-build .
or
npx @marko/build .
marko-build .
marko-build ./my-page.marko
--output -o
: Where to write the build--static
: Build static HTML files instead of a node serverWhile @marko/build
works out-of-the box without any config, it does allow customizing and extending the default config for unique use-cases.
NOTE:
@marko/build
currently uses webpack to build projects, however, this may change in the future so it's recommended to avoid using a custom webpack config if possible.
In the most extreme case, you can use a custom webpack.config.js
. This config file is discovered based on the entry that is passed to the cli command, but given that it's a standalone config file, you can use webpack
directly to build your project as well.
To help configure webpack, @marko/build
exports a configBuilder
function that allows you to use the base config, while adding your own customizations.
webpack.config.js
import path from "path";
import { configBuilder } from "@marko/build";
import MyPlugin from "my-plugin";
const { getServerConfig, getBrowserConfigs } = configBuilder({
entry: path.join(__dirname, "target.marko"),
production: process.env.NODE_ENV === "production"
});
module.exports = [
...getBrowserConfigs(config => {
config.plugins.push(new MyPlugin());
return config;
}),
getServerConfig(config => {
config.plugins.push(new MyPlugin());
return config;
})
];
npm install @marko/build
configBuilder
Returns 3 functions: getServerConfig
, getBrowserConfig
, and getBrowserConfigs
.
entry
- the marko file to buildoutput
- where to write the buildproduction
- whether to build in production modeloadWebpackConfig
Loads a custom webpack.config.js
or creates a default array of compiler configs.
entry
- the marko file to buildoutput
- where to write the buildproduction
- whether to build in production modeFAQs
Utility to serve Marko build a server from a template
We found that @marko/build demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.