diff options
author | 2021-03-19 17:17:38 -0400 | |
---|---|---|
committer | 2021-03-19 17:17:38 -0400 | |
commit | 2082001ff8702ec48072b59caafe85573a3b2891 (patch) | |
tree | d160341cc51dd39e562a209cad6db168f768a259 /examples/snowpack/snowpack.config.js | |
parent | 17c3c98f07628b43b941b84831e8e1f9bcd7ca46 (diff) | |
download | astro-2082001ff8702ec48072b59caafe85573a3b2891.tar.gz astro-2082001ff8702ec48072b59caafe85573a3b2891.tar.zst astro-2082001ff8702ec48072b59caafe85573a3b2891.zip |
Add snowpack as an example project. (#11)
* Initial tests set up
This adds tests using uvu (we can switch if people want) and restructures things a bit so that it's easier to test.
Like in snowpack you set up a little project. In our tests you can say:
```js
const result = await runtime.load('/blog/hello-world')
```
And analyze the result. I included a `test-helpers.js` which has a function that will turn HTML into a cheerio instance, for inspecting the result HTML.
* Bring snowpack example in
* Formatting
Diffstat (limited to 'examples/snowpack/snowpack.config.js')
-rw-r--r-- | examples/snowpack/snowpack.config.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/snowpack/snowpack.config.js b/examples/snowpack/snowpack.config.js new file mode 100644 index 000000000..5cab1aaa0 --- /dev/null +++ b/examples/snowpack/snowpack.config.js @@ -0,0 +1,31 @@ +/** @type {import("snowpack").SnowpackUserConfig } */ +module.exports = { + mount: { + public: '/', + //src: '/_dist_', + }, + plugins: [ + [ + '@snowpack/plugin-sass', { compilerOptions: { style: 'compressed' } }, + ], + '@snowpack/plugin-svelte', + '@snowpack/plugin-vue' + ], + packageOptions: { + // Blocked by CSS asset support + // source: 'remote', + // types: true, + }, + devOptions: { + // Eleventy updates multiple files at once, so add a 1000ms delay before we trigger a browser update + hmrDelay: 1000, + }, + buildOptions: { + out: '_site', + }, + optimize: { + bundle: true, + minify: true, + target: 'es2018', + }, +}; |