@justeattakeaway/pie-components-config 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/tsconfig.json +26 -0
- package/vite.config.js +47 -0
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-components-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Just Eat Takeaway.com - Design System Team",
|
|
7
7
|
"description": "Shared configuration files for PIE components",
|
|
8
8
|
"files": [
|
|
9
|
-
"custom-elements-manifest.config.js"
|
|
9
|
+
"custom-elements-manifest.config.js",
|
|
10
|
+
"vite.config.js",
|
|
11
|
+
"tsconfig.json"
|
|
10
12
|
],
|
|
11
13
|
"dependencies": {
|
|
12
14
|
"deepmerge-ts": "5.1.0"
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES6",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"lib": ["es2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"inlineSources": true,
|
|
10
|
+
"outDir": "./compiled",
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noUnusedLocals": true,
|
|
13
|
+
"noUnusedParameters": true,
|
|
14
|
+
"noImplicitReturns": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"noImplicitAny": true,
|
|
17
|
+
"noImplicitThis": true,
|
|
18
|
+
"moduleResolution": "node",
|
|
19
|
+
"allowSyntheticDefaultImports": true,
|
|
20
|
+
"experimentalDecorators": true,
|
|
21
|
+
"forceConsistentCasingInFileNames": true,
|
|
22
|
+
"allowImportingTsExtensions": true,
|
|
23
|
+
"noEmit": true,
|
|
24
|
+
},
|
|
25
|
+
"exclude": []
|
|
26
|
+
}
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import dts from 'vite-plugin-dts';
|
|
3
|
+
|
|
4
|
+
import { deepmerge } from 'deepmerge-ts';
|
|
5
|
+
|
|
6
|
+
const bundledJetDeps = [
|
|
7
|
+
'@justeattakeaway/pie-components-config',
|
|
8
|
+
'@justeattakeaway/pie-css',
|
|
9
|
+
'@justeattakeaway/pie-webc-testing',
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
// https://vitejs.dev/config/
|
|
13
|
+
const sharedConfig = ({ build = {}, plugins = [], ...rest }) => defineConfig({
|
|
14
|
+
build: deepmerge({
|
|
15
|
+
lib: {
|
|
16
|
+
entry: {
|
|
17
|
+
index: 'src/index.ts',
|
|
18
|
+
react: 'src/react.ts',
|
|
19
|
+
},
|
|
20
|
+
formats: ['es'],
|
|
21
|
+
},
|
|
22
|
+
rollupOptions: {
|
|
23
|
+
external: (id) => {
|
|
24
|
+
if (['react', '@lit/react'].includes(id) || /^lit/.test(id)) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (id.startsWith('@justeattakeaway/pie-') && !bundledJetDeps.includes(id)) {
|
|
29
|
+
console.info(`Excluding ${id} from the bundle`);
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return false;
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
}, build),
|
|
37
|
+
|
|
38
|
+
plugins: deepmerge([dts({
|
|
39
|
+
insertTypesEntry: true,
|
|
40
|
+
outputDir: 'dist',
|
|
41
|
+
rollupTypes: true,
|
|
42
|
+
})], plugins),
|
|
43
|
+
|
|
44
|
+
...rest,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export default sharedConfig;
|