Skip to content

Commit

Permalink
use correct file extension for examples
Browse files Browse the repository at this point in the history
package.json defines the examples as commonjs modules
modules need .mjs extensions
  • Loading branch information
e9x committed Jan 24, 2023
1 parent 309421d commit 0aede93
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions examples/basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import createBareServer from '@tomphttp/bare-server-node';
import http from 'node:http';
/* eslint-disable @typescript-eslint/no-var-requires */
const http = require('node:http');
const createBareServer = require('@tomphttp/bare-server-node');

const httpServer = http.createServer();

Expand Down
5 changes: 2 additions & 3 deletions examples/basic.cjs → examples/basic.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const http = require('node:http');
const createBareServer = require('@tomphttp/bare-server-node');
import createBareServer from '@tomphttp/bare-server-node';
import http from 'node:http';

const httpServer = http.createServer();

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0aede93

Please sign in to comment.