Skip to content

Commit

Permalink
Name the export for consistent use across ESM and CJS with correct ty…
Browse files Browse the repository at this point in the history
…ping
  • Loading branch information
steverep committed Dec 17, 2023
1 parent 3d64d09 commit 5d06769
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ Any `devTool` (source maps) option used in Webpack is supported. This includes "
Install the package from NPM and require or import it for your Webpack configuration:

```js
const TransformAsyncModulesPlugin = require("transform-async-modules-webpack-plugin");
const {
TransformAsyncModulesPlugin,
} = require("transform-async-modules-webpack-plugin");
```

or

```js
import TransformAsyncModulesPlugin from "transform-async-modules-webpack-plugin";
import { TransformAsyncModulesPlugin } from "transform-async-modules-webpack-plugin";
```

Then add an instance to the plugins array:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "transform-async-modules-webpack-plugin",
"description": "A Webpack plugin to transpile async module output using Babel. Allows transpiling top level await to ES5.",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",
"homepage": "https://github.com/steverep/transform-async-modules-webpack-plugin",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/index.cts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type TransformAsyncModulesPluginOptions = Pick<

const PLUGIN_NAME = "TransformAsyncModulesPlugin " as const;

export default class TransformAsyncModulesPlugin {
export class TransformAsyncModulesPlugin {
babelOptions: TransformOptions = {};

constructor(options: TransformAsyncModulesPluginOptions = {}) {
Expand Down

0 comments on commit 5d06769

Please sign in to comment.