Skip to content

Commit

Permalink
feat(bezier-vscode): remove hoistLimits and add rollup config for ser…
Browse files Browse the repository at this point in the history
…ver file as well

- not necessary to include node_modules because dependencies are included in bundle
  • Loading branch information
yangwooseong committed Dec 17, 2024
1 parent c637503 commit 2d722e0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1,645 deletions.
7 changes: 2 additions & 5 deletions packages/bezier-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
"client",
"server"
],
"installConfig": {
"hoistingLimits": "dependencies"
},
"activationEvents": [
"onLanguage:typescript",
"onLanguage:scss",
Expand Down Expand Up @@ -69,8 +66,8 @@
"clean:build": "rm -rf dist",
"clean:cache": "rm -rf node_modules .turbo",
"vscode:prepublish": "yarn build",
"package": "yarn dlx vsce ls --no-yarn && yarn dlx vsce package --no-dependencies",
"publish": "yarn dlx vsce publish --no-yarn --skip-duplicate"
"package": "yarn dlx vsce package --no-dependencies",
"publish": "yarn dlx vsce publish --no-dependencies --skip-duplicate"
},
"dependencies": {
"@channel.io/bezier-tokens": "0.2.13",
Expand Down
55 changes: 38 additions & 17 deletions packages/bezier-vscode/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
import commonjs from '@rollup/plugin-commonjs'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'
import { defineConfig } from 'rollup'

export default defineConfig({
input: 'src/client.ts',
output: {
dir: 'dist',
format: 'cjs',
/**
* @type {import('rollup').RollupOptions}
*/
export default [
{
input: 'src/server.ts',
output: {
file: 'dist/server.js',
format: 'cjs',
},
external: ['vscode'],
plugins: [
nodeResolve({
browser: false,
preferBuiltins: true,
extensions: ['.js', '.jsx', '.ts', '.tsx'],
}),
commonjs(),
typescript(),
],
},
external: ['vscode'],
plugins: [
nodeResolve({
browser: false,
preferBuiltins: true,
extensions: ['.js', '.jsx', '.ts', '.tsx'], // 해석할 파일 확장자
}),
commonjs(),
typescript(),
],
})
{
input: 'src/client.ts',
output: {
file: 'dist/client.js',
format: 'cjs',
},
external: ['vscode'],
plugins: [
nodeResolve({
browser: false,
preferBuiltins: true,
extensions: ['.js', '.jsx', '.ts', '.tsx'],
}),
commonjs(),
typescript(),
],
},
]
Loading

0 comments on commit 2d722e0

Please sign in to comment.