Skip to content

Commit

Permalink
fix: import config and read config from remix (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedeya authored Aug 29, 2023
1 parent effd9cf commit 6f0f5e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
}
},
"bin": {
"remix-sitemap": "./dist/cli.mjs",
"remix-sitemap-cjs": "./dist/cli.js"
"remix-sitemap": "./dist/cli.js",
"remix-sitemap-esm": "./dist/cli.mjs"
},
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function main() {

console.log('🔍 Found config file:', configPath);

const configFile = await import(configPath);
const { default: configFile } = await import(configPath);

const config = getConfig(configFile);

Expand Down
2 changes: 1 addition & 1 deletion src/bin/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readConfig } from '@remix-run/dev/dist/config';
import { readConfig } from '@remix-run/dev/dist/config.js';
import path from 'path';
import { createModuleBuilder } from './moduleBuilder';
import requireFromString from 'require-from-string';
Expand Down

0 comments on commit 6f0f5e3

Please sign in to comment.