This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
ankit-tailor
released this
01 Sep 12:56
·
585 commits
to main
since this release
Breaking changes
- Options changes
filename
andlibraryName
are changedstyled
uiLibraryPath
anduiLibraryName
are changed tocomponents
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'),
],
},
],
],
};
};