-
Notifications
You must be signed in to change notification settings - Fork 0
/
eleventy.config.cjs
40 lines (33 loc) · 1.43 KB
/
eleventy.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* ===========================================================================
Configuration file for Eleventy
https://www.11ty.dev/docs/config/
=========================================================================== */
require('dotenv').config();
module.exports = function (eleventyConfig) {
// Support the CSS files
eleventyConfig.addPassthroughCopy("./site-src/css/");
eleventyConfig.addWatchTarget("./site-src/css/");
// Support the JS files
eleventyConfig.addPassthroughCopy("./site-src/js/");
eleventyConfig.addWatchTarget("./site-src/js/");
// Support the map JS file
eleventyConfig.addWatchTarget("./dist/browser.js");
eleventyConfig.addPassthroughCopy({ './dist/browser.js': 'map/browser.js' });
eleventyConfig.setServerOptions({
// Whether DOM diffing updates are applied where possible instead of page reloads
// Disabling this because it caused weird issues with inline Javascript variables
// and errors getting thrown because the variable already exists.
domDiff: false,
// Change the port so that this doesn't interfere with other local development
port: 9090
});
// Add the Google Maps API key to the global data
eleventyConfig.addGlobalData('apiKey', process.env.GOOGLE_MAPS_API_KEY);
// Return your Object options:
return {
dir: {
input: "site-src",
output: "site-dist"
}
}
};