Skip to content

Commit a72fb14

Browse files
Hristo HristovHristo Hristov
authored andcommitted
feat(wc): change versions of target and lib to es2021 and module to es2022, remove vite html plugin and vite plugin babel from the configuration, update vite to 6.0.10
1 parent 4861a7e commit a72fb14

File tree

4 files changed

+6
-57
lines changed

4 files changed

+6
-57
lines changed

packages/cli/templates/webcomponents/igc-ts/projects/_base/files/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@
4242
"source-map": "^0.7.4",
4343
"tslib": "^2.8.1",
4444
"@types/mocha": "^10.0.6",
45-
"vite": "^6.0.7",
45+
"vite": "^6.0.10",
4646
"vite-plugin-pwa": "^0.21.1",
47-
"vite-plugin-static-copy": "^2.2.0",
48-
"vite-plugin-babel": "^1.3.0",
49-
"vite-plugin-html": "^3.2.2"
47+
"vite-plugin-static-copy": "^2.2.0"
5048
}
5149
}

packages/cli/templates/webcomponents/igc-ts/projects/_base/files/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es2021",
4-
"module": "es2020",
4+
"module": "es2022",
55
"moduleResolution": "node",
66
"noEmitOnError": true,
77
"lib": [
8-
"es2023",
8+
"es2021",
99
"dom",
1010
"dom.iterable"
1111
],

packages/cli/templates/webcomponents/igc-ts/projects/_base/files/vite.config.ts

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import { defineConfig } from 'vite';
2-
import { createHtmlPlugin } from 'vite-plugin-html';
3-
import babel from 'vite-plugin-babel';
42
import { VitePWA } from 'vite-plugin-pwa';
53
import { viteStaticCopy } from 'vite-plugin-static-copy';
64

@@ -28,51 +26,6 @@ export default defineConfig({
2826
{ src: 'src/assets', dest: 'src' },
2927
],
3028
}),
31-
/** HTML Plugin with service worker injection */
32-
createHtmlPlugin({
33-
minify: true,
34-
inject: {
35-
data: {
36-
},
37-
},
38-
}),
39-
/** Babel Plugin for JS transpilation */
40-
babel({
41-
babelConfig: {
42-
presets: [
43-
[
44-
'@babel/preset-env',
45-
{
46-
targets: [
47-
'last 3 Chrome major versions',
48-
'last 3 Firefox major versions',
49-
'last 3 Edge major versions',
50-
'last 3 Safari major versions',
51-
],
52-
modules: false,
53-
bugfixes: true,
54-
},
55-
],
56-
],
57-
plugins: [
58-
[
59-
'babel-plugin-template-html-minifier',
60-
{
61-
modules: { lit: ['html', { name: 'css', encapsulation: 'style' }] },
62-
failOnError: false,
63-
strictCSS: true,
64-
htmlMinifier: {
65-
collapseWhitespace: true,
66-
conservativeCollapse: true,
67-
removeComments: true,
68-
caseSensitive: true,
69-
minifyCSS: true,
70-
},
71-
},
72-
],
73-
],
74-
},
75-
}),
7629
/** PWA Plugin for service worker generation */
7730
VitePWA({
7831
registerType: 'autoUpdate',

packages/cli/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@
5050
"source-map": "^0.7.4",
5151
"tslib": "^2.8.1",
5252
"@types/mocha": "^10.0.6",
53-
"vite": "^6.0.7",
53+
"vite": "^6.0.10",
5454
"vite-plugin-pwa": "^0.21.1",
55-
"vite-plugin-static-copy": "^2.2.0",
56-
"vite-plugin-babel": "^1.3.0",
57-
"vite-plugin-html": "^3.2.2"
55+
"vite-plugin-static-copy": "^2.2.0"
5856
}
5957
}

0 commit comments

Comments
 (0)