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

Critical dependency: the request of a dependency is an expression #336

Closed
jaywcjlove opened this issue Jan 10, 2022 · 2 comments
Closed

Comments

@jaywcjlove
Copy link
Member

jaywcjlove commented Jan 10, 2022

Creating an optimized production build...
Compiled with warnings.

./node_modules/@babel/standalone/babel.js
Critical dependency: the request of a dependency is an expression

./node_modules/@babel/standalone/babel.js
Critical dependency: the request of a dependency is an expression

临时解决方案

$ CI=false npm run doc
module.exports = {
  //...
  module: {
      exprContextCritical: false
  },
};
export default (conf: Configuration, env: 'development' | 'production', options: LoaderConfOptions) => {

  if (env === 'production') {
    /** https://github.com/uiwjs/react-code-preview/issues/94 */
    conf.module!.exprContextCritical = false;
  }

  return conf;
};

Originally posted by @jaywcjlove in #198 (comment)

@jaywcjlove
Copy link
Member Author

@jaywcjlove
Copy link
Member Author

jaywcjlove referenced this issue in kktjs/markdown-react-code-preview-loader May 11, 2022
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