Plugins, built around webpack-chain, that make creating webpack configs easier.
fs
module with the BrowserFS equivalent.yarn add browserfs
in your project if using this plugin.yarn add monaco-editor
in your project if using this plugin.# latest stable
yarn add -D @stoplight/webpack
In your webpack.config.ts
file:
import { createConfig } from "@stoplight/webpack";
import * as path from "path";
import webpack from "webpack";
import { buildEnv } from "./env";
const isElectron = process.env.RUN_CONTEXT === "desktop";
const config: webpack.Configuration = createConfig({
srcDir: path.resolve(process.cwd(), "src"),
distDir: isElectron
? path.resolve(process.cwd(), "desktop", "src", "dist")
: path.resolve("desktop", "src", "dist"),
publicDir: path.resolve(process.cwd(), "src", "public"),
isElectron,
analyze: false,
debug: false,
stats: undefined,
plugins: {
browserfs: isElectron ? undefined : {},
bugsnag: undefined,
css: undefined,
fonts: {},
html: {
// string to assign to the head title tag
title: "Stoplight Studio",
// object to assign to window.env in a head tag script
env: buildEnv(),
// string of html to be inserted towards the top of the head tag
metaHtml: "",
// string of html to be inserted towards the bottom of the head tag
headHtml: "",
// string of html to be inserted towards the bottom of the body tag
bodyHtml: ""
},
javascript: undefined,
monaco: {},
optimizations: {},
presentation: {},
public: undefined,
serve: {},
stylus: undefined,
typescript: {},
workers: undefined
},
onBeforeBuild: _config => {
// ...do whatever you want w config, which is an instance of webpack-chain
}
});
export default config;
feature/{name}
, chore/{name}
, or fix/{name}
branchyarn setup
yarn test.prod
yarn commit
. NOTE: Commits that don't follow the conventional format will be rejected. yarn commit
creates this format for you, or you can put it together manually and then do a regular git commit
.git push
develop
branch