Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Minor][Dev] Wiki errors #5930

Open
VincentFP opened this issue Feb 9, 2023 · 0 comments
Open

[Minor][Dev] Wiki errors #5930

VincentFP opened this issue Feb 9, 2023 · 0 comments

Comments

@VincentFP
Copy link

VincentFP commented Feb 9, 2023

In short, this page is misleading and would need a few updates :)

Issue 1 - webpack.config.js > webpack.config.mjs

Copy over the webpack.config.js file from packages/core and change things accordingly:
should be changed to:
... webpack.config.mjs ...

to avoid

Cannot use import statement outside a module

Issues 2 - karma.conf.js updated not reflected in the docs

The provided snippet in the wiki should be updated in favor of:

/*
 * Copyright 2022 Palantir Technologies, Inc. All rights reserved.
 */

module.exports = async function (config) {
    const { createKarmaConfig } = await import("@blueprintjs/karma-build-scripts");
    config.set(
        createKarmaConfig({
            dirname: __dirname,
            coverageExcludes: [
            ],
        }),
    );
};

to avoid

Error in config file!
  Error [ERR_REQUIRE_ESM]: require() of ES Module /blueprint/packages/karma-build-scripts/index.mjs not supported.
Instead change the require of /blueprint/packages/karma-build-scripts/index.mjs to a dynamic import() which is available in all CommonJS modules.
@VincentFP VincentFP changed the title [minor][dev-env] Wiki errors [Minor][Dev] Wiki errors Feb 9, 2023
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

No branches or pull requests

1 participant