Skip to content

Commit

Permalink
fix: another attempt to fix the ESM issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
willum070 committed Sep 19, 2024
1 parent 2e77715 commit d3090ec
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 22 deletions.
47 changes: 31 additions & 16 deletions .eleventy.js → .eleventy.cjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
require("dotenv").config();

const typescript = require("./src/engines/typescript/sample");
const typescriptJSX = require("./src/engines/typescript/sample-jsx");
const sass = require("./src/engines/sass");
const stripRegionTags = require("./src/transforms/strip-region-tags");
const stripLicenseHeaders = require("./src/transforms/strip-license-headers");
const yourAPIKey = require("./src/transforms/your-api-key");
const format = require("./src/transforms/format");
const minify = require("./src/transforms/minify");
const skypack = require("./src/transforms/skypack");
const fs = require("fs");
const path = require("path");
const vite = require("vite");
const chalk = require("chalk");
const prettier = require("prettier");

module.exports = function (eleventyConfig) {
// const typescript = require("./src/engines/typescript/sample");
// const typescriptJSX = require("./src/engines/typescript/sample-jsx");
// const sass = require("./src/engines/sass");
// const stripRegionTags = require("./src/transforms/strip-region-tags");
// const stripLicenseHeaders = require("./src/transforms/strip-license-headers");
// const yourAPIKey = require("./src/transforms/your-api-key");
// const format = require("./src/transforms/format");
// const minify = require("./src/transforms/minify");
// const skypack = require("./src/transforms/skypack");
// const fs = require("fs");
// const path = require("path");
// const vite = require("vite");
// const chalk = require("chalk");
// const prettier = require("prettier");

const { typescript } = await ".src/engines/typescript/sample";
const { typescriptJSX } = await "./src/engines/typescript/sample-jsx";
const { sass } = await "./src/engines/sass";
const { stripRegionTags } = await "./src/transforms/strip-region-tags";
const { stripLicenseHeaders } = await "./src/transforms/strip-license-headers";
const { yourAPIKey } = await "./src/transforms/your-api-key";
const { format } = await "./src/transforms/format";
const { minify } = await "./src/transforms/minify";
const { skypack } = await "./src/transforms/skypack";
const { fs } = await "fs";
const { path } = await "path";
const { vite } = await "vite";
const { chalk } = await "chalk";
const { prettier } = await "prettier";

export default function (eleventyConfig) {
eleventyConfig.addWatchTarget("./shared/**/*");
eleventyConfig.addWatchTarget(".env*");

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@googlemaps/js-samples",
"description": "Samples for Google Maps JavaScript",
"version": "2.1.4",
"type": "module",
"keywords": [
"google",
"javascript",
Expand Down
6 changes: 3 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PlaywrightTestConfig, devices } from "@playwright/test";
import type { PlaywrightTestConfig, /* devices */ } from "@playwright/test";
import { test, expect, Expect } from "@playwright/test";
import fs from "fs";
import path from "path";
Expand Down Expand Up @@ -26,12 +26,12 @@ const config: PlaywrightTestConfig = {
port: 8080,
},
updateSnapshots: "none",
projects: [
/* projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
], */
reporter: process.env.CI ? "github" : "list",
};

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"module": "esnext",
"target": "esnext",
"module": "ES2022",
"target": "ES2022",
"strict": true,
"noImplicitAny": false,
"lib": ["esnext", "es6", "dom", "dom.iterable"],
"lib": ["ES2022", "es6", "dom", "dom.iterable"],
"moduleResolution": "Bundler",
"jsx": "preserve",
"esModuleInterop": true,
Expand Down

0 comments on commit d3090ec

Please sign in to comment.