Skip to content

Commit

Permalink
optimize production build
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed Jun 10, 2021
1 parent 432f90e commit 4342239
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion snowpack.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/** @type {import("snowpack").SnowpackUserConfig } */
const pkg = require('./package.json');

// pkg version avaiable in app via import.meta.env.SNOWPACK_PUBLIC_PACKAGE_VERSION
process.env.SNOWPACK_PUBLIC_PACKAGE_VERSION = pkg.version;

/** @type {import("snowpack").SnowpackUserConfig} */
module.exports = {
mount: {
public: '/',
Expand All @@ -26,6 +26,11 @@ module.exports = {
out: 'out',
baseUrl: process.env.VIZARR_PREFIX || './',
},
optimize: {
bundle: true,
minify: true,
splitting: true,
},
alias: {
/* ... */
},
Expand Down

0 comments on commit 4342239

Please sign in to comment.