
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
laxar-loader
Advanced tools
Take a look at the documentation site to browse documentation for all releases of this artifact.webpack loader for LaxarJS
Bundles and validates LaxarJS application artifacts as needed.
You could use laxar-loader directly, but since it does not need a specific entry module,
we pre-rolled the artifacts and debug-info entry points for you and placed them into this
module.
Import the entry points in your init.js:
import artifacts from 'laxar-loader/artifacts?flow=main&theme=rainbows-and-unicorns';
import debugInfo from 'laxar-loader/debug-info?flow=main&theme=rainbows-and-unicorns';
import { create } from 'laxar';
// const adapters = [ ... ];
// const configuration = { ... };
// ... later ...
create( adapters, artifacts, configuration )
.tooling( debugInfo )
.bootstrap();
Place a laxar.config.js file into your project root directory.
This is either the directory where your webpack.config.js is, or the directory configured
with webpack's context option.
The laxar.config.js file should look like this:
module.exports = {
paths: {
flows: './path/to/flows', // default: './application/flows'
themes: './path/to/themes', // default: './application/themes'
pages: './path/to/pages', // default: './application/pages'
layouts: './path/to/layouts', // default: './application/layouts'
widgets: './path/to/widgets', // default: './application/widgets'
controls: './path/to/controls', // default: './application/controls'
'default-theme': './path/to/default.theme'
}
};
If no laxar.config.js exists, the defaults (above) are used.
| Parameter | Description |
|---|---|
?flow, ?flows[] | reference(s) to the flow(s) to bundle |
?theme, ?themes[] | reference(s) to the theme(s) to bundle |
?page, ?pages[] | reference(s) to the page(s) to bundle; can be omitted if pages are reachable from the flow |
?layout, ?layouts[] | reference(s) to the layout(s) to bundle; can be omitted if layouts are referenced in bundled pages |
?widget, ?widgets[] | reference(s) to the widget(s) to bundle; can be omitted if widgets are referenced in bundled pages |
?control, ?controls[] | reference(s) to the control(s) to bundle; can be omitted if controls are referenced in bundled widgets |
Refer to the webpack documentation for details about the loader syntax.
The loaded artifacts listing can then be used to bootstrap LaxarJS.
When building the artifacts listing, the loader collects JSON, HTML and CSS files and generates
require calls so they will be present in your webpack bundle. If no loaders are configured for the
required files, laxar-loader will use the json-loader for JSON files,
raw-loader for HTML and will write out the resource path for CSS files.
The debug-info bundle is wrapped with bundle-loader?lazy, exporting a function
that can be called to asynchronously load debug information if necessary.
If you want to leverage the power of webpack to pre-process these artifacts, just add your loaders to the webpack configuration and they will be used to load the artifacts' assets. There are just a few rules your loaders should obey:
file- or url-loader) or be loaded
outside Laxar via the style-loader.Example:
module.exports = {
entry: { 'init': './init.js' },
output: {
path: path.resolve( __dirname, `./${publicPath}` ),
publicPath,
filename: '[name].bundle.js',
chunkFilename: '[name].bundle.js'
},
module: {
rules: [
{
test: /\.(css|gif|jpe?g|png|ttf|woff2?|svg|eot|otf)(\?.*)?$/,
loader: 'file-loader',
options: {
name: 'assets/[name]-[sha1:hash:hex:6].[ext]'
}
},
{
test: /\.(gif|jpe?g|png|svg)$/,
loader: 'img-loader?progressive=true'
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\/default.theme\/.*\.scss$/,
loader: 'sass-loader',
options: require( 'laxar-uikit/themes/default.theme/sass-options' )
},
{
test: /\/rainbows-and-unicorns\.theme\/.*\.scss$/,
loader: 'sass-loader',
options: require( './application/themes/rainbows-and-unicorns.theme/sass-options' )
}
]
}
};
FAQs
Webpack loader for LaxarJS artifacts
The npm package laxar-loader receives a total of 124 weekly downloads. As such, laxar-loader popularity was classified as not popular.
We found that laxar-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.