
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
reach-et-webpack-setup
Advanced tools
Webpack set up for ET projects
npm i --save-dev reach-et-webpack-setup
Create at your root a folder called webpack and add a config.yml and add the following:
default: &default
cue_url: https://localhost # Sets out your default local url (incase different)
source_path: assets #root path to your assets folder
image_entry: Images # name of image folder
stylesheets_entry: css # name of css folder
public_dev_output: https://localhost/webpack #path set through proxy used by webpack server
public_root_path: /cue-web/dist/ # output path
# You can add your own config here to like:
# for HTML plugin
html_output: '../index.html'
html_template: 'index.html'
public_output_path: /dist # output folder
# Templates plugin
templates_path: template
yaml_output: /etc/escenic/cue-web # where the yaml files are outputted in docker image
start_up_script: /usr/bin/startup.sh # startup script fired when dev-server starts
# google tag manager
google_tag_id: GTM-PXC7ST9
# Image and other static assets that can be used
static_assets_extensions:
- .jpg
- .jpeg
- .png
- .gif
- .tiff
- .ico
- .svg
- .eot
- .otf
- .ttf
- .woff
- .woff2
extensions:
- .mjs
- .js
- .css
- .module.css
- .png
- .svg
- .gif
- .ico
- .jpeg
- .jpg
development:
<<: *default
# Add additional Dev config here
# Webpack dev server config - Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
http2: false
host: 0.0.0.0
port: 3131
public: https://localhost:3131
hot: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
client_log_level: "debug"
headers:
Access-Control-Allow-Origin: "*"
Access-Control-Allow-Methods: "GET, POST, PUT, DELETE, PATCH, OPTIONS"
Access-Control-Allow-Headers: "X-Requested-With, content-type, Authorization"
# watch: true
history_api_fallback: true
watch_options:
aggregateTimeout: 300
ignored: "**/node_modules/**"
poll: 1000
production:
<<: *default
# Add additional production config here
Then create a webpack.config.js file:
/* eslint-env node */
const { webpackConfig } = require('reach-et-webpack-setup');
const { merge } = require('webpack-merge');
module.exports = merge(webpackConfig, {
entry: { index: 'my-index.js' },
});
For a more advanved example you can pull back the config object with the data listed in config.yml (please note they will now be camelCase):
/* eslint-env node */
const { TemplatePlugin, getFiles } = require('reach-et-templates-plugin');
const { webpackConfig, config } = require('reach-et-webpack-setup');
const GoogleTagManagerPlugin = require('reach-et-webpack-google-tag-manager-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { merge } = require('webpack-merge');
const { env } = require('process');
// See reach-et-templates-plugin
const files = getFiles(config);
// Use config data
const {
cueUrl,
googleTagId,
htmlOutput,
htmlTemplate,
publicDevOutput,
publicOutputPath,
publicRootPath,
startUpScript,
yamlOutput,
} = config;
const publicPath = env.NODE_ENV === 'development' ? publicDevOutput : publicOutputPath;
// You can pass any webpack config you want that will append to the config please see https://webpack.js.org/
module.exports = merge(webpackConfig, {
entry: { ...files },
plugins: [
// See reach-et-templates-plugin
new TemplatePlugin({
cueUrl: cueUrl,
js: publicRootPath,
publicPath,
output: yamlOutput,
shellScript: startUpScript,
}),
// see https://webpack.js.org/plugins/html-webpack-plugin/
new HtmlWebpackPlugin({
filename: htmlOutput,
alwaysWriteToDisk: true,
template: htmlTemplate,
excludeChunks: Object.keys(files),
}),
// See reach-et-webpack-google-tag-manager-plugin
new GoogleTagManagerPlugin({
id: googleTagId,
}),
],
});
Copyright (c) 2019 "Reach Shared Services Ltd"
FAQs
Webpack config for ET Tools
We found that reach-et-webpack-setup 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.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.