Skip to content

Commit

Permalink
fix: make react jsx transform work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
pierpo committed Jul 3, 2023
1 parent 5e33a64 commit c4574b7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Node } from './spatial-navigation/Components/Node';
export { Root } from './spatial-navigation/Components/Root';
12 changes: 11 additions & 1 deletion packages/core/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ module.exports = {
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
use: ['ts-loader'],
use: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
{
loader: 'ts-loader',
},
],
},
{
test: /\.css$/i,
Expand Down
12 changes: 11 additions & 1 deletion packages/example/webpack.config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@ module.exports = {
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
use: ['ts-loader'],
use: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
{
loader: 'ts-loader',
},
],
},
{
test: /\.css$/i,
Expand Down
11 changes: 0 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1662,17 +1662,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@react-spatial-navigation/core@workspace:packages/core"
dependencies:
"@react-native-community/eslint-config": ^3.2.0
"@typescript-eslint/eslint-plugin": ^5.60.1
"@typescript-eslint/parser": ^5.60.1
eslint: ^8.44.0
eslint-config-prettier: ^8.8.0
eslint-define-config: ^1.21.0
eslint-plugin-prettier: ^4.2.1
eslint-plugin-react: ^7.32.2
eslint-plugin-react-hooks: ^4.6.0
eslint-plugin-react-native: ^4.0.0
prettier: ^2.8.8
webpack: ^5.88.1
webpack-cli: ^5.1.4
webpack-dev-server: ^4.15.1
Expand Down

0 comments on commit c4574b7

Please sign in to comment.