-
Notifications
You must be signed in to change notification settings - Fork 703
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove 'use client' header (#1798)
- Loading branch information
1 parent
ce3eb7e
commit 618fbc8
Showing
6 changed files
with
160 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import path from 'path' | ||
import babel from '@rollup/plugin-babel' | ||
import resolve from '@rollup/plugin-node-resolve' | ||
import json from '@rollup/plugin-json' | ||
import glslify from 'rollup-plugin-glslify' | ||
import multiInput from 'rollup-plugin-multi-input' | ||
import { terser } from 'rollup-plugin-terser' | ||
|
||
const root = process.platform === 'win32' ? path.resolve('/') : '/' | ||
const external = (id) => !id.startsWith('.') && !id.startsWith(root) | ||
const extensions = ['.js', '.jsx', '.ts', '.tsx', '.json'] | ||
|
||
const getBabelOptions = ({ useESModules }) => ({ | ||
babelrc: false, | ||
extensions, | ||
exclude: '**/node_modules/**', | ||
babelHelpers: 'runtime', | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
include: [ | ||
'@babel/plugin-proposal-class-properties', | ||
'@babel/plugin-proposal-optional-chaining', | ||
'@babel/plugin-proposal-nullish-coalescing-operator', | ||
'@babel/plugin-proposal-numeric-separator', | ||
'@babel/plugin-proposal-logical-assignment-operators', | ||
], | ||
bugfixes: true, | ||
loose: true, | ||
modules: false, | ||
targets: '> 1%, not dead, not ie 11, not op_mini all', | ||
}, | ||
], | ||
'@babel/preset-react', | ||
'@babel/preset-typescript', | ||
], | ||
plugins: [ | ||
'@babel/plugin-proposal-nullish-coalescing-operator', | ||
['@babel/transform-runtime', { regenerator: false, useESModules }], | ||
], | ||
}) | ||
|
||
export default [ | ||
{ | ||
input: ['src/**/*.ts', 'src/**/*.tsx', '!src/index.ts'], | ||
output: { dir: `dist`, format: 'esm' }, | ||
external, | ||
plugins: [ | ||
multiInput(), | ||
json(), | ||
glslify(), | ||
babel(getBabelOptions({ useESModules: true }, '>1%, not dead, not ie 11, not op_mini all')), | ||
resolve({ extensions }), | ||
], | ||
}, | ||
{ | ||
input: `./src/index.ts`, | ||
output: { dir: `dist`, format: 'esm' }, | ||
external, | ||
plugins: [ | ||
json(), | ||
glslify(), | ||
babel(getBabelOptions({ useESModules: true }, '>1%, not dead, not ie 11, not op_mini all')), | ||
resolve({ extensions }), | ||
], | ||
preserveModules: true, | ||
}, | ||
{ | ||
input: ['src/**/*.ts', 'src/**/*.tsx', '!src/index.ts'], | ||
output: { dir: `dist`, format: 'cjs' }, | ||
external, | ||
plugins: [ | ||
multiInput({ | ||
transformOutputPath: (output) => output.replace(/\.[^/.]+$/, '.cjs.js'), | ||
}), | ||
json(), | ||
glslify(), | ||
babel(getBabelOptions({ useESModules: false })), | ||
resolve({ extensions }), | ||
terser(), | ||
], | ||
}, | ||
{ | ||
input: `./src/index.ts`, | ||
output: { file: `dist/index.cjs.js`, format: 'cjs' }, | ||
external, | ||
plugins: [json(), glslify(), babel(getBabelOptions({ useESModules: false })), resolve({ extensions }), terser()], | ||
}, | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
'use client' | ||
|
||
export * from './web' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
618fbc8
There was a problem hiding this comment.
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:
drei – ./
drei-pmndrs.vercel.app
drei.vercel.app
drei-git-master-pmndrs.vercel.app
drei.react-spring.io
drei.pmnd.rs