Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

@gluestack-style/[email protected]

Compare
Choose a tag to compare
@ankit-tailor ankit-tailor released this 01 Sep 12:56
· 585 commits to main since this release
eb17e9a

Breaking changes

  • Options changes
    • filename and libraryName are changed styled
    • uiLibraryPath and uiLibraryName are changed to components

Old Babel config

// babel.config.js
const path = require('path');
const gluestackStyleResolver = require('@gluestack-style/babel-plugin-styled-resolver');

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      [
        gluestackStyleResolver,
        {
          filename: path.resolve(__dirname, './core/styled'), // Specify the file path of the styled function
          libraryName: '@gluestack-style/react', // Specify the library name from where the styled function is exported
          uiLibraryPath: path.resolve(__dirname, './core/components'), // Specify the file path of the styled function
          uiLibraryName: '@gluestack-ui/themed', // Specify the library name from where the styled function is exported
        },
      ],
    ],
  };
};

New Babel config

// babel.config.js
const path = require('path');
const gluestackStyleResolver = require('@gluestack-style/babel-plugin-styled-resolver');

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      [
        gluestackStyleResolver,
        {
           styled: [
            '@gluestack-style/react',
            path.resolve(__dirname, './gluestack-ui-components/core/styled'),
          ],
          components: [
            '@gluesatck-ui/themed',
            path.resolve(__dirname, './gluestack-ui-components/core/component'),
          ],
        },
      ],
    ],
  };
};