Skip to content

Cannot run public demo in nrwl nx #632

Answered by Stupidism
Stupidism asked this question in Q&A
Discussion options

You must be logged in to vote

It might need a configuration in payload.admin.webpack to modify the babel config. My solution now is:

// babel.config.js
module.exports = {
  presets: [
    [
      '@babel/preset-env',
      {
        modules: 'commonjs',
        targets: {
          node: "current",
        },
      },
    ],
    '@babel/preset-typescript',
    '@babel/preset-react',
  ],
};
import { buildConfig } from 'payload/config';
import _ from 'lodash';

import babelConfig from '../babel.config';

import { Articles } from './collections/Articles';
import { Authors } from './collections/Authors';
	@@ -7,14 +10,42 @@ import { ColdArticles } from './collections/ColdArticles';
import { Media } from './collections/M…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@Stupidism
Comment options

@jmikrut
Comment options

@Stupidism
Comment options

@Stupidism
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Stupidism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants