Skip to content

Commit

Permalink
Merge pull request #88 from ryoppippi/fix-jiti-docs
Browse files Browse the repository at this point in the history
feat: update jiti initialization and import in webpack
  • Loading branch information
ryoppippi authored Jun 12, 2024
2 parents e8dea86 + 71a29af commit 3032f0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/unplugin-typia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ npm install jiti

```js
// webpack.config.js
const jiti = require('jiti')();
const UnpluginTypia = jiti('@ryoppippi/unplugin-typia/webpack').default;
const jiti = require('jiti')(__filename);
const { default: UnpluginTypia } = jiti('@ryoppippi/unplugin-typia/webpack');

module.exports = {
plugins: [
Expand Down
4 changes: 2 additions & 2 deletions packages/unplugin-typia/src/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import unplugin from './core/index.js';
* @example
* ```js
* // webpack.config.js
* const jiti = require("jiti")();
* const UnpluginTypia = jiti("@ryoppippi/unplugin-typia/webpack").default;
* const jiti = require("jiti")(__filename);
* const { default: UnpluginTypia } = jiti("@ryoppippi/unplugin-typia/webpack");
*
* module.exports = {
* plugins: [UnpluginTypia({ /* your config *\/ })],
Expand Down

0 comments on commit 3032f0d

Please sign in to comment.