Sha256: 4f2b24466e5fdff4073de696e37b18300281c8aaf6099629086b2749416651f6

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

const output_path = process.env["SNOWPACKER_OUTPUT_PATH"]
const port = process.env["SNOWPACKER_PORT"]
const build_dir = process.env["SNOWPACKER_BUILD_DIR"]
const mount_dir = process.env["SNOWPACKER_MOUNT_DIR"]
const babel_config = process.env["SNOWPACKER_BABEL_CONFIG_FILE"]
const postcss_config = process.env["SNOWPACKER_POSTCSS_CONFIG_FILE"]

// not currently supported
// const hostname = process.env["SNOWPACKER_HOSTNAME"]

const scripts = {
  "mount:web_modules": `mount $WEB_MODULES --to /${output_path}/web_modules`,
  "mount:snowpacks": `mount ${mount_dir} --to /${output_path}`,
  "build:css": `postcss --config ${postcss_config}`,
  "build:js,jsx,ts,tsx": `babel --config-file ${babel_config} \
                                ${mount_dir}`
}

const installOptions = {
  NODE_ENV: true
}

const devOptions = {
  port: parseInt(port, 10),
  open: "none",
  out: build_dir
}

const buildOptions = {
  clean: true,
  baseUrl: "/",
  metaDir: `${output_path}/__snowpack__`
}

module.exports = {
  scripts,
  plugins: [],
  installOptions,
  devOptions,
  buildOptions
}

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
snowpacker-0.0.4.alpha1 examples/rails-without-webpack/config/snowpacker/snowpack.config.js
snowpacker-0.0.4.alpha1 lib/snowpacker/templates/snowpack.config.js