wix-incubator / mjml-react

React component library to generate the HTML emails on the fly
MIT License
993 stars 50 forks source link

Deprecated warning! #63

Closed vh13294 closed 3 years ago

vh13294 commented 3 years ago

Here is my package.json

{
    "dependencies": {
        "mjml": "^4.10.3",
        "mjml-react": "^2.0.0",
        "react": "^17.0.2",
        "react-dom": "^17.0.2",
        "typescript": "^4.4.3"
    },
}

tsconfig

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "module": "commonjs",
    "declaration": true,
    "declarationMap": true,
    "strict": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "ESNEXT",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
  }
}

code to reproduce

import { render } from 'mjml-react';
const template = home();
render(template).html;

function home(): React.ReactElement {
     return (
    <Mjml>
      <MjmlBody></MjmlBody>
    </Mjml>
  );
}

terminal output:

"minify" option is deprecated in mjml-core and only available in mjml cli.
vh13294 commented 3 years ago

dupllicate https://github.com/wix-incubator/mjml-react/issues/58