Skip to content

Commit

Permalink
chore: update configurations to support esm
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-ebey committed Jul 25, 2023
1 parent 75f4eaa commit 75b2e10
Show file tree
Hide file tree
Showing 25 changed files with 190 additions and 188 deletions.
File renamed without changes.
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": "remix-monorepo",
"private": true,
"license": "MIT",
"type": "module",
"workspaces": [
"packages/create-remix",
"packages/remix",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-remix/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
getCliConfig,
getOutputDir,
isBareModuleId,
} = require("../../rollup.utils");
} = require("../../rollup.utils.cjs");
const { name: packageName, version } = require("./package.json");

/** @returns {import("rollup").RollupOptions[]} */
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-architect/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { getAdapterConfig } = require("../../rollup.utils");
const { getAdapterConfig } = require("../../rollup.utils.cjs");

/** @returns {import("rollup").RollupOptions[]} */
module.exports = function rollup() {
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare-pages/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const {
getAdapterConfig,
getOutputDir,
isBareModuleId,
} = require("../../rollup.utils");
} = require("../../rollup.utils.cjs");
const { name: packageName, version } = require("./package.json");

/** @returns {import("rollup").RollupOptions[]} */
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare-workers/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const {
getAdapterConfig,
getOutputDir,
isBareModuleId,
} = require("../../rollup.utils");
} = require("../../rollup.utils.cjs");
const { name: packageName, version } = require("./package.json");

/** @returns {import("rollup").RollupOptions[]} */
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const {
copyToPlaygrounds,
isBareModuleId,
createBanner,
} = require("../../rollup.utils");
} = require("../../rollup.utils.cjs");
const { name: packageName, version } = require("./package.json");

/** @returns {import("rollup").RollupOptions[]} */
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-css-bundle/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const {
createBanner,
getOutputDir,
isBareModuleId,
} = require("../../rollup.utils");
} = require("../../rollup.utils.cjs");
const { name: packageName, version } = require("./package.json");

/** @returns {import("rollup").RollupOptions[]} */
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-deno/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// deno-lint-ignore-file
const copy = require("rollup-plugin-copy");

const { getOutputDir, copyToPlaygrounds } = require("../../rollup.utils");
const { getOutputDir, copyToPlaygrounds } = require("../../rollup.utils.cjs");

/** @returns {import("rollup").RollupOptions[]} */
module.exports = function rollup() {
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "./modules";
import "./modules.d.ts";

export type { AppConfig, RemixConfig as ResolvedRemixConfig } from "./config";

Expand Down
170 changes: 170 additions & 0 deletions packages/remix-dev/modules.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
declare module "*.aac" {
let asset1: string;
export default asset1;
}
declare module "*.avif" {
let asset2: string;
export default asset2;
}
declare module "*.module.css" {
let styles: { readonly [key: string]: string };
export default styles;
}
declare module "*.css" {
let asset3: string;
export default asset3;
}
declare module "*.csv" {
let asset4: string;
export default asset4;
}
declare module "*.eot" {
let asset5: string;
export default asset5;
}
declare module "*.fbx" {
let asset6: string;
export default asset6;
}
declare module "*.flac" {
let asset7: string;
export default asset7;
}
declare module "*.gif" {
let asset8: string;
export default asset8;
}
declare module "*.glb" {
let asset9: string;
export default asset9;
}
declare module "*.gltf" {
let asset10: string;
export default asset10;
}
declare module "*.gql" {
let asset11: string;
export default asset11;
}
declare module "*.graphql" {
let asset12: string;
export default asset12;
}
declare module "*.hdr" {
let asset13: string;
export default asset13;
}
declare module "*.ico" {
let asset14: string;
export default asset14;
}
declare module "*.jpeg" {
let asset15: string;
export default asset15;
}
declare module "*.jpg" {
let asset16: string;
export default asset16;
}
declare module "*.md" {
import type { ComponentType, ReactHTML } from "react";
export let attributes: any;
export let filename: string;
let Component1: ComponentType<
Readonly<Record<string, unknown>> & {
components?: Readonly<
Partial<
Record<keyof ReactHTML | "wrapper", keyof ReactHTML | ComponentType>
>
>;
}
>;
export default Component1;
}
declare module "*.mdx" {
import type { ComponentType, ReactHTML } from "react";
export let attributes: any;
export let filename: string;
let Component2: ComponentType<
Readonly<Record<string, unknown>> & {
components?: Readonly<
Partial<
Record<keyof ReactHTML | "wrapper", keyof ReactHTML | ComponentType>
>
>;
}
>;
export default Component2;
}
declare module "*.mp3" {
let asset17: string;
export default asset17;
}
declare module "*.mov" {
let asset18: string;
export default asset18;
}
declare module "*.mp4" {
let asset19: string;
export default asset19;
}
declare module "*.ogg" {
let asset20: string;
export default asset20;
}
declare module "*.otf" {
let asset21: string;
export default asset21;
}
declare module "*.png" {
let asset22: string;
export default asset22;
}
declare module "*.psd" {
let asset23: string;
export default asset23;
}
declare module "*.sql" {
let asset24: string;
export default asset24;
}
declare module "*.svg" {
let asset25: string;
export default asset25;
}
declare module "*.ttf" {
let asset26: string;
export default asset26;
}
declare module "*.wasm" {
let asset27: string;
export default asset27;
}
declare module "*.wav" {
let asset28: string;
export default asset28;
}
declare module "*.webm" {
let asset29: string;
export default asset29;
}
declare module "*.webp" {
let asset30: string;
export default asset30;
}
declare module "*.woff" {
let asset31: string;
export default asset31;
}
declare module "*.woff2" {
let asset32: string;
export default asset32;
}
declare module "*.webmanifest" {
let asset33: string;
export default asset33;
}
declare module "*.zip" {
let asset34: string;
export default asset34;
}
Loading

0 comments on commit 75b2e10

Please sign in to comment.