Sha256: 7a4f440fa65c80765ad93b0d915440c3cdf721ef03420773f88fa45c03c08b1c
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
const path = require("path") const prefix = "VITE_RB" // Build related items const MOUNT_PATH = process.env[`${prefix}_MOUNT_PATH`] const OUTPUT_DIR = process.env[`${prefix}_OUTPUT_DIR`] const BUILD_DIR = process.env[`${prefix}_BUILD_DIR`] const ENTRYPOINTS_DIR = process.env[`${prefix}_ENTRYPOINTS_DIR`] // Config files const POSTCSS_CONFIG = process.env[`${prefix}_POSTCSS_CONFIG_FILE`] // Dev server stuff const HOSTNAME = process.env[`${prefix}_HOSTNAME`] const HTTPS = process.env[`${prefix}_HTTPS`] const PORT = process.env[`${prefix}_PORT`] const mount = { [MOUNT_PATH]: `/${OUTPUT_DIR}` } const installOptions = { NODE_ENV: true, } const devOptions = { hostname: HOSTNAME, port: parseInt(PORT, 10), open: "none", out: BUILD_DIR, secure: (HTTPS === "true") } const buildOptions = { clean: true, baseUrl: `/`, metaDir: path.join(OUTPUT_DIR, "__snowpack__"), webModulesUrl: path.join(OUTPUT_DIR, "web_modules") } const plugins = [ [ "@snowpack/plugin-build-script", { "cmd": `postcss --config ${POSTCSS_CONFIG}`, "watch": "$1 --watch", "input": [".css"], "output": [".css"] } ], ] module.exports = { mount, plugins: plugins, installOptions, devOptions, buildOptions, }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vite_rb-0.0.1.alpha1 | examples/rails-without-webpack/config/snowpacker/snowpack.config.js |