Skip to content

fix doc error#28

Open
baurine wants to merge 1 commit intomartonlederer:mainfrom
baurine:fix_doc
Open

fix doc error#28
baurine wants to merge 1 commit intomartonlederer:mainfrom
baurine:fix_doc

Conversation

@baurine
Copy link

@baurine baurine commented Dec 3, 2021

If we use as the following code in the doc:

const esbuild = require("esbuild");
const postCssPlugin = require("esbuild-plugin-postcss2");

esbuild.build({
  ...
  plugins: [
    postCssPlugin.default()
  ]
  ...
});

It will report the following error:

$ node builder.js
/repo_path/node_modules/esbuild-plugin-postcss2/dist/index.js:37
  plugins = [],
  ^

TypeError: Cannot read properties of undefined (reading 'plugins')
    at Object.postCSSPlugin (/mnt/bao/codes/personal/try-esbuild/esbuild-demo/node_modules/esbuild-plugin-postcss2/dist/index.js:37:3)
    at Object.<anonymous> (/mnt/bao/codes/personal/try-esbuild/esbuild-demo/builder.js:41:34)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47
error Command failed with exit code 1.

@baurine
Copy link
Author

baurine commented Dec 6, 2021

hi @martonlederer , the commit 32d928a is trying to fix this issue, right? but it seems the CI test doesn't pass, can you have a look? thanks!

@baurine
Copy link
Author

baurine commented Dec 10, 2021

This PR can be closed without merging if PR #30 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant