Skip to content

Commit

Permalink
chore: use TS Bundler to build lib (#215)
Browse files Browse the repository at this point in the history
- also switch to port 4000 to avoid conflicts with other projects
  • Loading branch information
ghiscoding authored Feb 17, 2024
1 parent f1af597 commit cf336b8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
23 changes: 15 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,26 @@
"version": "0.2.0",
"configurations": [
{
"name": "Launch Edge",
"name": "Chrome Debugger",
"request": "launch",
"type": "msedge",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
"type": "chrome",
"sourceMaps": true,
"url": "http://localhost:4000",
"webRoot": "${workspaceFolder}/packages/demo",
"pathMapping": {
"/@fs/": ""
}
},
{
"name": "Vite - Edge Debugger",
"type": "msedge",
"name": "MS Edge Debugger",
"request": "launch",
"type": "msedge",
"sourceMaps": true,
"trace": false,
"url": "http://localhost:3000"
"url": "http://localhost:4000",
"webRoot": "${workspaceFolder}/packages/demo",
"pathMapping": {
"/@fs/": ""
}
}
]
}
5 changes: 3 additions & 2 deletions packages/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"skipLibCheck": true
"skipLibCheck": true,
"typeRoots": ["./node_modules/@types"]
},
"include": ["src"]
"include": ["src/**/*", "index.d.ts"]
}
5 changes: 4 additions & 1 deletion packages/demo/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { defineConfig } from 'vite';
export default defineConfig({
base: './',
server: {
port: 3000,
port: 4000,
cors: true,
host: 'localhost',
},
optimizeDeps: {
exclude: ['multiple-select-vanilla'],
},
});
8 changes: 5 additions & 3 deletions packages/multiple-select-vanilla/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"compilerOptions": {
"baseUrl": "./",
"declaration": true,
"declarationMap": true,
"rootDir": "src",
"outDir": "dist/esm",
"target": "ES2018",
"target": "ES2021",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"moduleResolution": "Node",
"lib": ["es2021", "DOM"],
"moduleResolution": "Bundler",
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"strict": true,
"resolveJsonModule": true,
Expand Down
2 changes: 1 addition & 1 deletion playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig({
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: Boolean(process.env.CI),
use: {
baseURL: 'http://localhost:3000/',
baseURL: 'http://localhost:4000/',
headless: true,
viewport: { width: 1280, height: 720 },
ignoreHTTPSErrors: true,
Expand Down

0 comments on commit cf336b8

Please sign in to comment.