Skip to content

Commit

Permalink
fix: upgrade build deps, suppress directive warning on build (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonambas authored Dec 27, 2023
1 parent 2651918 commit 0faad69
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 35 deletions.
8 changes: 8 additions & 0 deletions lib/makeViteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ export const makeViteConfig = async (
input: {
main: resolve(dirname, 'index.html'),
preview: resolve(dirname, 'preview.html')
},
// Supresses module directive warning
// See https://github.com/rollup/rollup/issues/4699
onwarn: (warning, warn) => {
if (warning.code === 'THIS_IS_UNDEFINED') {
return;
}
return warn;
}
}
},
Expand Down
52 changes: 19 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@sweatpants/libra",
"version": "0.0.37",
"description": "",
"type": "module",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -87,7 +88,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"rimraf": "5.0.5",
"rollup": "2.79.1",
"rollup": "4.9.1",
"rollup-plugin-esbuild": "6.1.0",
"typescript": "5.2.2",
"wait-on": "7.2.0"
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from 'rollup';
import esbuild from 'rollup-plugin-esbuild';
import cjs from '@rollup/plugin-commonjs';
import pkg from './package.json';
import pkg from './package.json' assert { type: 'json' };

const config = defineConfig({
input: 'lib/index.ts',
Expand Down
3 changes: 3 additions & 0 deletions tests/react-18/files/component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use client';

export const ClientComponent = () => <div>Client Component</div>;
6 changes: 6 additions & 0 deletions tests/react-18/files/test.libra.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ClientComponent } from './component';

directory('folder 1', () => {
add('story 1', () => {
return <div>folder 1 story 1</div>;
Expand Down Expand Up @@ -29,3 +31,7 @@ add('root story 1', () => {
add('root story 2', () => {
return <div>root story 2</div>;
});

add('client component', () => {
return <ClientComponent />;
});

1 comment on commit 0faad69

@vercel
Copy link

@vercel vercel bot commented on 0faad69 Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

libra – ./

libra-test.vercel.app
libra-jambas.vercel.app
libra-git-main-jambas.vercel.app

Please sign in to comment.