Compare commits

..

136 Commits

Author SHA1 Message Date
semantic-release-bot f448b6dff8 chore(release): 0.1.0-develop.44 [skip ci]
# [0.1.0-develop.44](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.43...v0.1.0-develop.44) (2023-07-29)

### Bug Fixes

* add define alias for window to globalThis ([a6251ae](a6251ae4ea))

### Features

* add support for vite define ([ae2b679](ae2b679700))
2023-07-29 17:56:08 +00:00
Derrick Hammer 35e0f05e5c
Merge remote-tracking branch 'origin/develop' into develop 2023-07-29 13:55:09 -04:00
Derrick Hammer a6251ae4ea
fix: add define alias for window to globalThis 2023-07-29 13:55:03 -04:00
Derrick Hammer ae2b679700
feat: add support for vite define 2023-07-29 13:54:39 -04:00
semantic-release-bot 7bb871e743 chore(release): 0.1.0-develop.43 [skip ci]
# [0.1.0-develop.43](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.42...v0.1.0-develop.43) (2023-07-12)

### Bug Fixes

* dont symlink vite.config.js ([850a235](850a2351b5))
2023-07-12 08:43:36 +00:00
Derrick Hammer 90597a495c
Merge remote-tracking branch 'origin/develop' into develop 2023-07-12 04:42:50 -04:00
Derrick Hammer 850a2351b5
fix: dont symlink vite.config.js 2023-07-12 04:42:43 -04:00
semantic-release-bot 80bcb6cc78 chore(release): 0.1.0-develop.42 [skip ci]
# [0.1.0-develop.42](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.41...v0.1.0-develop.42) (2023-07-11)

### Bug Fixes

* force inlineDynamicImports ([d594632](d5946321d0))
2023-07-11 11:47:30 +00:00
Derrick Hammer d5946321d0
fix: force inlineDynamicImports 2023-07-11 07:46:46 -04:00
semantic-release-bot 7e13eda63c chore(release): 0.1.0-develop.41 [skip ci]
# [0.1.0-develop.41](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.40...v0.1.0-develop.41) (2023-07-11)

### Bug Fixes

* update node-fetch dummy export to include Response, FormData and Blob ([a53e888](a53e8885b4))
2023-07-11 09:05:53 +00:00
Derrick Hammer 9717ff4692
Merge remote-tracking branch 'origin/develop' into develop 2023-07-11 05:05:00 -04:00
Derrick Hammer a53e8885b4
fix: update node-fetch dummy export to include Response, FormData and Blob 2023-07-11 05:04:53 -04:00
semantic-release-bot eed086ab31 chore(release): 0.1.0-develop.40 [skip ci]
# [0.1.0-develop.40](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.39...v0.1.0-develop.40) (2023-07-09)

### Features

* add .prettierignore template ([c73dff7](c73dff7326))
2023-07-09 10:30:31 +00:00
Derrick Hammer 2d138e9a25
Merge remote-tracking branch 'origin/develop' into develop 2023-07-09 06:29:25 -04:00
Derrick Hammer c73dff7326
feat: add .prettierignore template 2023-07-09 06:29:18 -04:00
semantic-release-bot 6877c36d5f chore(release): 0.1.0-develop.39 [skip ci]
# [0.1.0-develop.39](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.38...v0.1.0-develop.39) (2023-07-08)

### Bug Fixes

* add buffer as a dep and ensure it is pinned ([f4e12d7](f4e12d7695))
2023-07-08 11:10:37 +00:00
Derrick Hammer 4120e077e6
Merge remote-tracking branch 'origin/develop' into develop 2023-07-08 07:09:37 -04:00
Derrick Hammer f4e12d7695
fix: add buffer as a dep and ensure it is pinned 2023-07-08 07:09:32 -04:00
semantic-release-bot ea92b66d0d chore(release): 0.1.0-develop.38 [skip ci]
# [0.1.0-develop.38](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.37...v0.1.0-develop.38) (2023-07-08)

### Bug Fixes

* always dedupe primary sdk libraries ([4e9c506](4e9c506490))
2023-07-08 07:58:33 +00:00
Derrick Hammer 4427cd2d6d
Merge remote-tracking branch 'origin/develop' into develop 2023-07-08 03:57:39 -04:00
Derrick Hammer 4e9c506490
fix: always dedupe primary sdk libraries 2023-07-08 03:57:35 -04:00
semantic-release-bot 1b64cfb865 chore(release): 0.1.0-develop.37 [skip ci]
# [0.1.0-develop.37](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.36...v0.1.0-develop.37) (2023-07-08)

### Bug Fixes

* always exclude node fetch from bundles ([27c52db](27c52db167))
2023-07-08 07:39:44 +00:00
Derrick Hammer fa867eee24
Merge remote-tracking branch 'origin/develop' into develop 2023-07-08 03:38:59 -04:00
Derrick Hammer 27c52db167
fix: always exclude node fetch from bundles 2023-07-08 03:38:54 -04:00
semantic-release-bot cb35f13457 chore(release): 0.1.0-develop.36 [skip ci]
# [0.1.0-develop.36](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.35...v0.1.0-develop.36) (2023-07-08)
2023-07-08 07:34:00 +00:00
Derrick Hammer 7d5601472d
Merge remote-tracking branch 'origin/develop' into develop 2023-07-08 03:33:14 -04:00
Derrick Hammer 36d799d801
refactor: Revert "feat: add wasm plugin"
This reverts commit 5a72c3c946.
2023-07-08 03:33:02 -04:00
semantic-release-bot 134cfc49cc chore(release): 0.1.0-develop.35 [skip ci]
# [0.1.0-develop.35](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.34...v0.1.0-develop.35) (2023-07-08)

### Features

* add wasm plugin ([5a72c3c](5a72c3c946))
2023-07-08 07:25:17 +00:00
Derrick Hammer 5fe2dd5f0e
Merge remote-tracking branch 'origin/develop' into develop 2023-07-08 03:24:20 -04:00
Derrick Hammer 5a72c3c946
feat: add wasm plugin 2023-07-08 03:24:11 -04:00
semantic-release-bot 7e00c80224 chore(release): 0.1.0-develop.34 [skip ci]
# [0.1.0-develop.34](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.33...v0.1.0-develop.34) (2023-07-08)

### Bug Fixes

* override tsconfig.build ([2883344](28833448f2))
2023-07-08 07:04:15 +00:00
Derrick Hammer 78e77d1d23
Merge remote-tracking branch 'origin/develop' into develop 2023-07-08 03:03:18 -04:00
Derrick Hammer 28833448f2
fix: override tsconfig.build 2023-07-08 03:01:30 -04:00
semantic-release-bot 7589bf1246 chore(release): 0.1.0-develop.33 [skip ci]
# [0.1.0-develop.33](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.32...v0.1.0-develop.33) (2023-07-08)

### Bug Fixes

* path import not needed ([81b9332](81b9332cac))
2023-07-08 06:49:33 +00:00
Derrick Hammer f912db22c3
Merge remote-tracking branch 'origin/develop' into develop 2023-07-08 02:48:48 -04:00
Derrick Hammer 81b9332cac
fix: path import not needed 2023-07-08 02:48:44 -04:00
semantic-release-bot 0ab3154599 chore(release): 0.1.0-develop.32 [skip ci]
# [0.1.0-develop.32](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.31...v0.1.0-develop.32) (2023-07-08)

### Bug Fixes

* add templates to npm, and move out of src ([edbcf1c](edbcf1ce32))
2023-07-08 06:45:23 +00:00
Derrick Hammer 15d7aae404
Merge remote-tracking branch 'origin/develop' into develop 2023-07-08 02:44:27 -04:00
Derrick Hammer edbcf1ce32
fix: add templates to npm, and move out of src 2023-07-08 02:44:21 -04:00
semantic-release-bot 0433e828e9 chore(release): 0.1.0-develop.31 [skip ci]
# [0.1.0-develop.31](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.30...v0.1.0-develop.31) (2023-07-08)

### Bug Fixes

* add default polyfill config ([f6ba49c](f6ba49c45f))
2023-07-08 06:40:15 +00:00
Derrick Hammer f6ba49c45f
fix: add default polyfill config 2023-07-08 02:23:16 -04:00
semantic-release-bot a3e87b4a44
chore(release): 0.1.0-develop.30 [skip ci]
# [0.1.0-develop.30](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.29...v0.1.0-develop.30) (2023-07-03)

### Bug Fixes

* change node-resolve config to assume it is an object entry since we rewrite it in the rollup plugin in browser mode ([398be8f](398be8fede))
* passing browser mode does not work here ([40580f7](40580f793f))
2023-07-08 02:15:56 -04:00
Derrick Hammer 9bb629d441
feat: move to vite from rollup 2023-07-08 02:15:55 -04:00
Derrick Hammer f6a5bc27b6
Merge remote-tracking branch 'origin/develop' into develop 2023-07-03 05:14:35 -04:00
Derrick Hammer 40580f793f
fix: passing browser mode does not work here 2023-07-03 05:14:30 -04:00
Derrick Hammer 398be8fede
fix: change node-resolve config to assume it is an object entry since we rewrite it in the rollup plugin in browser mode 2023-07-03 05:14:05 -04:00
semantic-release-bot 84d852a22f chore(release): 0.1.0-develop.29 [skip ci]
# [0.1.0-develop.29](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.28...v0.1.0-develop.29) (2023-07-03)

### Bug Fixes

* add libkernel, libweb, and libportal to node resolve de-dup explicitly to prevent import problems ([0fb8d6c](0fb8d6c73b))
2023-07-03 08:28:55 +00:00
Derrick Hammer 1faacf5966
Merge remote-tracking branch 'origin/develop' into develop 2023-07-03 04:28:02 -04:00
Derrick Hammer 0fb8d6c73b
fix: add libkernel, libweb, and libportal to node resolve de-dup explicitly to prevent import problems 2023-07-03 04:27:55 -04:00
semantic-release-bot 225088c584 chore(release): 0.1.0-develop.28 [skip ci]
# [0.1.0-develop.28](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.27...v0.1.0-develop.28) (2023-07-02)
2023-07-02 21:22:07 +00:00
Derrick Hammer 2185f52d34
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 17:21:21 -04:00
Derrick Hammer 2f7e4b9fea
dep: update presetter-preset-rollup 2023-07-02 17:21:02 -04:00
semantic-release-bot c725d4a80d chore(release): 0.1.0-develop.27 [skip ci]
# [0.1.0-develop.27](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.26...v0.1.0-develop.27) (2023-07-02)
2023-07-02 21:12:27 +00:00
Derrick Hammer 97657accef
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 17:11:37 -04:00
Derrick Hammer 42249377d9
dep: update presetter-preset-rollup, remove plugin-typescript 2023-07-02 17:11:33 -04:00
semantic-release-bot 4c3a0a1581 chore(release): 0.1.0-develop.26 [skip ci]
# [0.1.0-develop.26](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.25...v0.1.0-develop.26) (2023-07-02)
2023-07-02 15:50:34 +00:00
Derrick Hammer 3be6ded0df
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 11:49:48 -04:00
Derrick Hammer 8f60515f9c
dep: update presetter-preset-rollup 2023-07-02 11:49:44 -04:00
semantic-release-bot b2eed97f5c chore(release): 0.1.0-develop.25 [skip ci]
# [0.1.0-develop.25](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.24...v0.1.0-develop.25) (2023-07-02)
2023-07-02 15:40:49 +00:00
Derrick Hammer 49aa52ffca
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 11:39:50 -04:00
Derrick Hammer c21bb0badf
dep: update presetter-preset-rollup, remove plugin-wasm 2023-07-02 11:39:44 -04:00
semantic-release-bot acaaabc038 chore(release): 0.1.0-develop.24 [skip ci]
# [0.1.0-develop.24](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.23...v0.1.0-develop.24) (2023-07-02)

### Bug Fixes

* pass browser to supplementaryConfig ([398bee7](398bee7e03))
2023-07-02 08:07:37 +00:00
Derrick Hammer b0691eb2d2
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 04:06:45 -04:00
Derrick Hammer 398bee7e03
fix: pass browser to supplementaryConfig 2023-07-02 04:06:39 -04:00
Derrick Hammer 8cbdf3fa98
dep: update presetter-preset-rollup 2023-07-02 04:06:04 -04:00
semantic-release-bot 94c5822195 chore(release): 0.1.0-develop.23 [skip ci]
# [0.1.0-develop.23](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.22...v0.1.0-develop.23) (2023-07-02)

### Bug Fixes

* ensure plugin-node-resolve uses browser mode ([3b6fec0](3b6fec053f))
2023-07-02 07:18:29 +00:00
Derrick Hammer a8e160f477
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 03:17:43 -04:00
Derrick Hammer 3b6fec053f
fix: ensure plugin-node-resolve uses browser mode 2023-07-02 03:17:39 -04:00
semantic-release-bot 27d27900f8 chore(release): 0.1.0-develop.22 [skip ci]
# [0.1.0-develop.22](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.21...v0.1.0-develop.22) (2023-07-02)

### Bug Fixes

* set inlineDynamicImports to true ([a58775a](a58775aefd))
2023-07-02 06:38:08 +00:00
Derrick Hammer 362b497883
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 02:37:16 -04:00
Derrick Hammer a58775aefd
fix: set inlineDynamicImports to true 2023-07-02 02:37:08 -04:00
semantic-release-bot 2373165825 chore(release): 0.1.0-develop.21 [skip ci]
# [0.1.0-develop.21](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.20...v0.1.0-develop.21) (2023-07-02)
2023-07-02 05:15:09 +00:00
Derrick Hammer b66337af0f
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 01:14:06 -04:00
Derrick Hammer 271bfb5eb3
dep: update presetter-preset-rollup 2023-07-02 01:14:01 -04:00
semantic-release-bot c05dade90a chore(release): 0.1.0-develop.20 [skip ci]
# [0.1.0-develop.20](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.19...v0.1.0-develop.20) (2023-06-30)

### Bug Fixes

* publish needs to be npmPublish ([a2f2ee9](a2f2ee9913))
2023-06-30 10:08:13 +00:00
Derrick Hammer a2f2ee9913
fix: publish needs to be npmPublish 2023-06-30 06:07:28 -04:00
semantic-release-bot 1d88aee0ea chore(release): 0.1.0-develop.19 [skip ci]
# [0.1.0-develop.19](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.18...v0.1.0-develop.19) (2023-06-30)

### Bug Fixes

* add override for releaserc to disable npm publishing ([a5cf685](a5cf68538d))
2023-06-30 09:28:14 +00:00
Derrick Hammer 1d6754140f
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 05:27:24 -04:00
Derrick Hammer a5cf68538d
fix: add override for releaserc to disable npm publishing 2023-06-30 05:27:18 -04:00
semantic-release-bot 54d9b950a2 chore(release): 0.1.0-develop.18 [skip ci]
# [0.1.0-develop.18](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.17...v0.1.0-develop.18) (2023-06-30)
2023-06-30 08:38:37 +00:00
Derrick Hammer f087296b67
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 04:37:52 -04:00
Derrick Hammer bff6b93337
dep: update @lumeweb/presetter-preset-rollup 2023-06-30 04:37:48 -04:00
semantic-release-bot 929b949fad chore(release): 0.1.0-develop.17 [skip ci]
# [0.1.0-develop.17](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.16...v0.1.0-develop.17) (2023-06-30)
2023-06-30 08:18:23 +00:00
Derrick Hammer 561fc2a9c9
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 04:17:33 -04:00
Derrick Hammer 4010c3e7c7
dep: update @lumeweb/presetter-preset-rollup 2023-06-30 04:17:28 -04:00
semantic-release-bot 77c666faeb chore(release): 0.1.0-develop.16 [skip ci]
# [0.1.0-develop.16](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.15...v0.1.0-develop.16) (2023-06-30)
2023-06-30 08:02:46 +00:00
Derrick Hammer cb29a844a6
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 04:01:39 -04:00
Derrick Hammer 7ff568a3f1
dep: update @lumeweb/presetter-preset-rollup 2023-06-30 04:01:32 -04:00
semantic-release-bot 4e53dd1200 chore(release): 0.1.0-develop.15 [skip ci]
# [0.1.0-develop.15](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.14...v0.1.0-develop.15) (2023-06-30)

### Reverts

* Revert "fix: re-order extends" ([dab120c](dab120cd2f))
2023-06-30 07:49:04 +00:00
Derrick Hammer 9217bb0881
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 03:48:04 -04:00
Derrick Hammer 5912944b37
dep: update @lumeweb/presetter-preset-rollup 2023-06-30 03:47:57 -04:00
Derrick Hammer dab120cd2f
Revert "fix: re-order extends"
This reverts commit b6f8e36836.
2023-06-30 03:47:00 -04:00
semantic-release-bot 3965118253 chore(release): 0.1.0-develop.14 [skip ci]
# [0.1.0-develop.14](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.13...v0.1.0-develop.14) (2023-06-30)
2023-06-30 07:26:06 +00:00
Derrick Hammer cfc210625f
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 03:25:05 -04:00
Derrick Hammer 0181286c50
dep: update @lumeweb/presetter-preset-rollup 2023-06-30 03:24:59 -04:00
semantic-release-bot ffd5520df9 chore(release): 0.1.0-develop.13 [skip ci]
# [0.1.0-develop.13](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.12...v0.1.0-develop.13) (2023-06-30)
2023-06-30 07:20:14 +00:00
Derrick Hammer 5e1fc8a018
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 03:19:27 -04:00
Derrick Hammer 47f9f9cc7b
dep: update @lumeweb/presetter-preset-rollup 2023-06-30 03:19:22 -04:00
semantic-release-bot 462c4cb2e8 chore(release): 0.1.0-develop.12 [skip ci]
# [0.1.0-develop.12](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.11...v0.1.0-develop.12) (2023-06-30)

### Bug Fixes

* re-order extends ([b6f8e36](b6f8e36836))
2023-06-30 07:02:28 +00:00
Derrick Hammer 448a0d3bc2
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 03:01:22 -04:00
Derrick Hammer b6f8e36836
fix: re-order extends 2023-06-30 03:00:44 -04:00
semantic-release-bot e159df1679 chore(release): 0.1.0-develop.11 [skip ci]
# [0.1.0-develop.11](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.10...v0.1.0-develop.11) (2023-06-30)
2023-06-30 06:57:46 +00:00
Derrick Hammer f6e4811cf3
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 02:57:02 -04:00
Derrick Hammer aedbafdfb2
dep: update @lumeweb/presetter-preset-rollup 2023-06-30 02:56:56 -04:00
semantic-release-bot 5a3677873b chore(release): 0.1.0-develop.10 [skip ci]
# [0.1.0-develop.10](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.9...v0.1.0-develop.10) (2023-06-30)

### Bug Fixes

* fix plugins list ([21b414b](21b414b25b))
2023-06-30 06:19:35 +00:00
Derrick Hammer e33ca7cab5
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 02:18:50 -04:00
Derrick Hammer 21b414b25b
fix: fix plugins list 2023-06-30 02:18:35 -04:00
semantic-release-bot d9a620978f chore(release): 0.1.0-develop.9 [skip ci]
# [0.1.0-develop.9](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.8...v0.1.0-develop.9) (2023-06-30)
2023-06-30 06:14:31 +00:00
Derrick Hammer 7aa14f88e6
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 02:13:41 -04:00
Derrick Hammer 320ddff97d
dep: update @lumeweb/presetter-preset-rollup 2023-06-30 02:11:23 -04:00
semantic-release-bot 00fa7370be chore(release): 0.1.0-develop.8 [skip ci]
# [0.1.0-develop.8](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.7...v0.1.0-develop.8) (2023-06-30)
2023-06-30 05:59:36 +00:00
Derrick Hammer 9629cc9e4f
Merge remote-tracking branch 'origin/develop' into develop 2023-06-30 01:58:54 -04:00
Derrick Hammer d2c1f479ea
refactor: use forked @lumeweb/presetter-preset-rollup 2023-06-30 01:58:41 -04:00
semantic-release-bot 26295ea717 chore(release): 0.1.0-develop.7 [skip ci]
# [0.1.0-develop.7](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.6...v0.1.0-develop.7) (2023-06-29)
2023-06-29 22:22:48 +00:00
Derrick Hammer 253243aea5
Merge remote-tracking branch 'origin/develop' into develop 2023-06-29 18:21:46 -04:00
Derrick Hammer 43460ec023
dep: add @rollup/plugin-wasm 2023-06-29 18:21:43 -04:00
semantic-release-bot 73e2452226 chore(release): 0.1.0-develop.6 [skip ci]
# [0.1.0-develop.6](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.5...v0.1.0-develop.6) (2023-06-29)
2023-06-29 22:19:48 +00:00
Derrick Hammer 5fedb6a707
Merge remote-tracking branch 'origin/develop' into develop 2023-06-29 18:18:53 -04:00
Derrick Hammer 0b86b78918
refactor: override rollup.plugins 2023-06-29 18:18:47 -04:00
semantic-release-bot 3b3ce47a95 chore(release): 0.1.0-develop.5 [skip ci]
# [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-06-29)
2023-06-29 21:58:29 +00:00
Derrick Hammer c8d79e64a1
Merge remote-tracking branch 'origin/develop' into develop 2023-06-29 17:57:32 -04:00
Derrick Hammer 8bb25bdc4a
refactor: override rollup.output 2023-06-29 17:57:25 -04:00
semantic-release-bot 210e8956b2 chore(release): 0.1.0-develop.4 [skip ci]
# [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-06-29)
2023-06-29 21:34:46 +00:00
Derrick Hammer 86cfb65ccd
Merge remote-tracking branch 'origin/develop' into develop 2023-06-29 17:33:43 -04:00
Derrick Hammer dc7907782d
dep: update deps 2023-06-29 17:33:35 -04:00
semantic-release-bot 42c7544652 chore(release): 0.1.0-develop.3 [skip ci]
# [0.1.0-develop.3](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.2...v0.1.0-develop.3) (2023-06-27)

### Bug Fixes

* add presetter-preset-strict as dep ([7d6eb89](7d6eb8964e))

### Reverts

* Revert "fix: add presetter-preset-rollup and presetter-preset-strict as peer deps" ([c6b4c4e](c6b4c4e2d7))
2023-06-27 06:51:27 +00:00
Derrick Hammer b3c90c6b0a
Merge remote-tracking branch 'origin/develop' into develop 2023-06-27 02:50:30 -04:00
Derrick Hammer 7d6eb8964e
fix: add presetter-preset-strict as dep 2023-06-27 02:50:24 -04:00
Derrick Hammer c6b4c4e2d7
Revert "fix: add presetter-preset-rollup and presetter-preset-strict as peer deps"
This reverts commit 4894c5d3d3.
2023-06-27 02:49:31 -04:00
semantic-release-bot 006ec1d66e chore(release): 0.1.0-develop.2 [skip ci]
# [0.1.0-develop.2](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.1...v0.1.0-develop.2) (2023-06-27)

### Bug Fixes

* add presetter-preset-rollup and presetter-preset-strict as peer deps ([4894c5d](4894c5d3d3))
2023-06-27 06:46:23 +00:00
Derrick Hammer 4894c5d3d3
fix: add presetter-preset-rollup and presetter-preset-strict as peer deps 2023-06-27 02:45:23 -04:00
semantic-release-bot bc9436d1d5 chore(release): 0.1.0-develop.1 [skip ci]
# [0.1.0-develop.1](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.0.1...v0.1.0-develop.1) (2023-06-27)

### Bug Fixes

* add .presetterrc.json ([a4f3331](a4f3331a21))
* add npm-shrinkwrap.json ([82281b8](82281b8ce8))
* add repository to package.json ([c8d2f77](c8d2f77cf7))

### Features

* initial version ([64ba208](64ba20821f))
2023-06-27 06:16:09 +00:00
Derrick Hammer a4f3331a21
fix: add .presetterrc.json 2023-06-27 02:04:25 -04:00
Derrick Hammer 82281b8ce8
fix: add npm-shrinkwrap.json 2023-06-27 02:01:23 -04:00
Derrick Hammer c8d2f77cf7
fix: add repository to package.json 2023-06-27 02:00:05 -04:00
Derrick Hammer 64ba20821f
feat: initial version 2023-06-27 01:59:03 -04:00
10 changed files with 19325 additions and 0 deletions

13
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: Build/Publish
on:
push:
branches:
- master
- develop
- develop-*
jobs:
main:
uses: lumeweb/github-node-deploy-workflow/.github/workflows/main.yml@master
secrets: inherit

5
.presetterrc.json Normal file
View File

@ -0,0 +1,5 @@
{
"preset": [
"@lumeweb/node-library-preset"
]
}

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
templates/vite.config.js

235
CHANGELOG.md Normal file
View File

@ -0,0 +1,235 @@
# [0.1.0-develop.44](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.43...v0.1.0-develop.44) (2023-07-29)
### Bug Fixes
* add define alias for window to globalThis ([a6251ae](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/a6251ae4ea74498cf7709d31c64e9214831609af))
### Features
* add support for vite define ([ae2b679](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/ae2b6797008d3defdfac6d1e5444cd9df0f68aa2))
# [0.1.0-develop.43](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.42...v0.1.0-develop.43) (2023-07-12)
### Bug Fixes
* dont symlink vite.config.js ([850a235](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/850a2351b5f0d4dfd5ca700d0a9a36c64883f766))
# [0.1.0-develop.42](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.41...v0.1.0-develop.42) (2023-07-11)
### Bug Fixes
* force inlineDynamicImports ([d594632](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/d5946321d08a5ab81539427db6d91f20f0bce1ed))
# [0.1.0-develop.41](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.40...v0.1.0-develop.41) (2023-07-11)
### Bug Fixes
* update node-fetch dummy export to include Response, FormData and Blob ([a53e888](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/a53e8885b4fa04bdd1ab2053433b5b15dbc57076))
# [0.1.0-develop.40](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.39...v0.1.0-develop.40) (2023-07-09)
### Features
* add .prettierignore template ([c73dff7](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/c73dff73267f39ca4624283bdb10c8718c0082cc))
# [0.1.0-develop.39](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.38...v0.1.0-develop.39) (2023-07-08)
### Bug Fixes
* add buffer as a dep and ensure it is pinned ([f4e12d7](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/f4e12d7695e9fe792014092aed1e39a5adfeadac))
# [0.1.0-develop.38](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.37...v0.1.0-develop.38) (2023-07-08)
### Bug Fixes
* always dedupe primary sdk libraries ([4e9c506](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/4e9c506490744f9047d183dc7cad144fe6612a44))
# [0.1.0-develop.37](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.36...v0.1.0-develop.37) (2023-07-08)
### Bug Fixes
* always exclude node fetch from bundles ([27c52db](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/27c52db1676c1b15d054578584d320a7c8ad0e5b))
# [0.1.0-develop.36](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.35...v0.1.0-develop.36) (2023-07-08)
# [0.1.0-develop.35](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.34...v0.1.0-develop.35) (2023-07-08)
### Features
* add wasm plugin ([5a72c3c](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/5a72c3c946e6ab1a53a0d1f7c3681dc3d8054de3))
# [0.1.0-develop.34](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.33...v0.1.0-develop.34) (2023-07-08)
### Bug Fixes
* override tsconfig.build ([2883344](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/28833448f29e7cbde5cbea3e241ff669134530a8))
# [0.1.0-develop.33](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.32...v0.1.0-develop.33) (2023-07-08)
### Bug Fixes
* path import not needed ([81b9332](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/81b9332cacdc57dedfcd6defcf67c2aa0b60b76f))
# [0.1.0-develop.32](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.31...v0.1.0-develop.32) (2023-07-08)
### Bug Fixes
* add templates to npm, and move out of src ([edbcf1c](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/edbcf1ce32269b22877f94899e19fdfc3db060db))
# [0.1.0-develop.31](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.30...v0.1.0-develop.31) (2023-07-08)
### Bug Fixes
* add default polyfill config ([f6ba49c](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/f6ba49c45f8516779a15f89b11207081c913c44d))
# [0.1.0-develop.30](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.29...v0.1.0-develop.30) (2023-07-03)
### Bug Fixes
* change node-resolve config to assume it is an object entry since we rewrite it in the rollup plugin in browser mode ([398be8f](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/398be8fede84167282c3252ab24e6149bf095f32))
* passing browser mode does not work here ([40580f7](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/40580f793f7c4b94f37cf62961bd062b4bb24c55))
# [0.1.0-develop.29](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.28...v0.1.0-develop.29) (2023-07-03)
### Bug Fixes
* add libkernel, libweb, and libportal to node resolve de-dup explicitly to prevent import problems ([0fb8d6c](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/0fb8d6c73b0567af8856ff2b7f196a57001c5071))
# [0.1.0-develop.28](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.27...v0.1.0-develop.28) (2023-07-02)
# [0.1.0-develop.27](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.26...v0.1.0-develop.27) (2023-07-02)
# [0.1.0-develop.26](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.25...v0.1.0-develop.26) (2023-07-02)
# [0.1.0-develop.25](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.24...v0.1.0-develop.25) (2023-07-02)
# [0.1.0-develop.24](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.23...v0.1.0-develop.24) (2023-07-02)
### Bug Fixes
* pass browser to supplementaryConfig ([398bee7](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/398bee7e03284720e62f3550e1ff72d67ab12c0d))
# [0.1.0-develop.23](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.22...v0.1.0-develop.23) (2023-07-02)
### Bug Fixes
* ensure plugin-node-resolve uses browser mode ([3b6fec0](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/3b6fec053f4c0d69426c3fde8eb680ea4edc4a50))
# [0.1.0-develop.22](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.21...v0.1.0-develop.22) (2023-07-02)
### Bug Fixes
* set inlineDynamicImports to true ([a58775a](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/a58775aefdd1b7ba5c06b01ee919e3f7ac9f1f90))
# [0.1.0-develop.21](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.20...v0.1.0-develop.21) (2023-07-02)
# [0.1.0-develop.20](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.19...v0.1.0-develop.20) (2023-06-30)
### Bug Fixes
* publish needs to be npmPublish ([a2f2ee9](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/a2f2ee991367c5f0c27b143f01bc15ebd365d7d6))
# [0.1.0-develop.19](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.18...v0.1.0-develop.19) (2023-06-30)
### Bug Fixes
* add override for releaserc to disable npm publishing ([a5cf685](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/a5cf68538d3eb786581f8db1f5bcad731721c56d))
# [0.1.0-develop.18](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.17...v0.1.0-develop.18) (2023-06-30)
# [0.1.0-develop.17](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.16...v0.1.0-develop.17) (2023-06-30)
# [0.1.0-develop.16](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.15...v0.1.0-develop.16) (2023-06-30)
# [0.1.0-develop.15](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.14...v0.1.0-develop.15) (2023-06-30)
### Reverts
* Revert "fix: re-order extends" ([dab120c](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/dab120cd2f6928732370a3b23e833a8a1ca06e63))
# [0.1.0-develop.14](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.13...v0.1.0-develop.14) (2023-06-30)
# [0.1.0-develop.13](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.12...v0.1.0-develop.13) (2023-06-30)
# [0.1.0-develop.12](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.11...v0.1.0-develop.12) (2023-06-30)
### Bug Fixes
* re-order extends ([b6f8e36](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/b6f8e3683621cca1fad3158ddd706896a162337b))
# [0.1.0-develop.11](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.10...v0.1.0-develop.11) (2023-06-30)
# [0.1.0-develop.10](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.9...v0.1.0-develop.10) (2023-06-30)
### Bug Fixes
* fix plugins list ([21b414b](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/21b414b25bd3988975ab32963be64ffbd3d2a5fc))
# [0.1.0-develop.9](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.8...v0.1.0-develop.9) (2023-06-30)
# [0.1.0-develop.8](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.7...v0.1.0-develop.8) (2023-06-30)
# [0.1.0-develop.7](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.6...v0.1.0-develop.7) (2023-06-29)
# [0.1.0-develop.6](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.5...v0.1.0-develop.6) (2023-06-29)
# [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-06-29)
# [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-06-29)
# [0.1.0-develop.3](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.2...v0.1.0-develop.3) (2023-06-27)
### Bug Fixes
* add presetter-preset-strict as dep ([7d6eb89](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/7d6eb8964ed336ba143cd5f7892df41ae2061d3a))
### Reverts
* Revert "fix: add presetter-preset-rollup and presetter-preset-strict as peer deps" ([c6b4c4e](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/c6b4c4e2d739b7ec69bb6943db936d9caeea362d))
# [0.1.0-develop.2](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.1.0-develop.1...v0.1.0-develop.2) (2023-06-27)
### Bug Fixes
* add presetter-preset-rollup and presetter-preset-strict as peer deps ([4894c5d](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/4894c5d3d33b94d41d537751f65349dc81cfd883))
# [0.1.0-develop.1](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/compare/v0.0.1...v0.1.0-develop.1) (2023-06-27)
### Bug Fixes
* add .presetterrc.json ([a4f3331](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/a4f3331a2163180218e5024dcad6b863ee4ae64f))
* add npm-shrinkwrap.json ([82281b8](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/82281b8ce8b323ac9bf2afc235ae855e20cb64c2))
* add repository to package.json ([c8d2f77](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/c8d2f77cf70b3e5f28b87966614ce49be7174562))
### Features
* initial version ([64ba208](https://git.lumeweb.com/LumeWeb/presetter-kernel-module-preset/commit/64ba20821f3b0dab50fc48fd95b3254ece888b36))

18887
npm-shrinkwrap.json generated Normal file

File diff suppressed because it is too large Load Diff

34
package.json Normal file
View File

@ -0,0 +1,34 @@
{
"name": "@lumeweb/presetter-kernel-module-preset",
"version": "0.1.0-develop.44",
"type": "module",
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "gitea@git.lumeweb.com:LumeWeb/presetter-kernel-module-preset.git"
},
"readme": "ERROR: No README data found!",
"scripts": {
"prepare": "presetter bootstrap",
"build": "run build",
"semantic-release": "semantic-release"
},
"dependencies": {
"@lumeweb/node-library-preset": "0.2.7",
"buffer": "^6.0.3",
"presetter": "^4.0.1",
"vite": "^4.4.2",
"vite-plugin-node-polyfills": "^0.9.0",
"vite-plugin-optimizer": "^1.4.2"
},
"publishConfig": {
"access": "public"
},
"files": [
"lib",
"templates"
],
"overrides": {
"buffer": "^6.0.3"
}
}

130
src/index.ts Normal file
View File

@ -0,0 +1,130 @@
import type { PresetAsset } from "presetter-types";
import { PresetContext } from "presetter-types";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { loadFile, resolveDirective, template } from "presetter";
const DIR = fileURLToPath(dirname(import.meta.url));
// paths to the template directory
const TEMPLATES = resolve(DIR, "..", "templates");
/** List of configurable variables */
export type Variable = {
/** the directory containing all source code (default: source) */
source: string;
/** the directory containing all the compiled files (default: lib) */
output: string;
buildSource: string;
};
export const DEFAULT_VARIABLE: Variable = {
source: "build",
output: "lib",
buildSource: "src",
};
function buildOptions(context: PresetContext) {
const opts = context.custom.config?.vite as any;
if (!opts) {
throw new Error("vite options missing!");
}
const define = opts.define;
const build = opts.build;
const resolve = opts.resolve;
const optimize = opts.optimize;
const polyfill = opts.polyfill;
return {
viteDefine: resolveDirective(define, context).stringifiedConfig,
viteBuild: resolveDirective(build, context).stringifiedConfig,
viteResolve: resolveDirective(resolve, context).stringifiedConfig,
viteOptimize: resolveDirective(optimize, context).stringifiedConfig,
vitePolyfill: resolveDirective(polyfill, context).stringifiedConfig,
};
}
/**
* get the list of templates provided by this preset
* @returns list of preset templates
*/
export default async function (context: PresetContext): Promise<PresetAsset> {
const ignores = !context.custom.config?.official
? [".github/workflows/ci.yml"]
: [];
return {
extends: ["@lumeweb/node-library-preset"],
template: {
/* eslint-disable @typescript-eslint/naming-convention */
"vite.config.js": (context) => {
const content = loadFile(resolve(TEMPLATES, "vite.config.js"), "text");
const variable = buildOptions(context);
return template(content, variable);
/* eslint-enable @typescript-eslint/naming-convention */
},
".prettierignore": resolve(TEMPLATES, "prettierignore"),
},
supplementaryIgnores: ignores,
supplementaryConfig: {
"release": {
plugins: {
"3": ["@semantic-release/npm", { npmPublish: false }],
},
},
"vite": {
define: {
"window.": "globalThis.",
},
build: {
outDir: "{output}",
lib: {
// Could also be a dictionary or array of multiple entry points
entry: "{source}/index.js",
name: "main",
formats: ["cjs"],
fileName: "index",
},
minify: false,
rollupOptions: {
output: {
inlineDynamicImports: true,
},
},
},
resolve: {
dedupe: [
"@lumeweb/libportal",
"@lumeweb/libweb",
"@lumeweb/libkernel",
],
},
optimize: {
"node-fetch":
"const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};",
},
polyfill: {
exclude: ["fs"],
globals: {
Buffer: true,
global: true,
process: true,
},
},
},
"tsconfig.build": {
include: ["{buildSource}"],
compilerOptions: {
outDir: "{source}",
},
},
},
scripts: resolve(TEMPLATES, "scripts.yaml"),
variable: DEFAULT_VARIABLE,
noSymlinks: ["vite.config.js"],
};
}

1
templates/prettierignore Normal file
View File

@ -0,0 +1 @@
lib

7
templates/scripts.yaml Normal file
View File

@ -0,0 +1,7 @@
# replace the `prepare` template from presetter-preset
# so that the build procedure will not be triggered upon package installation
build: cross-env NODE_ENV=production run-s clean build:typescript:* build:vite
build:vite: vite build && mv lib/*.cjs lib/index.js
develop: cross-env NODE_ENV=development run-s "vite:rollup -- --watch {@}" --
clean:buildOutput: shx rm -rf {source}

12
templates/vite.config.js Normal file
View File

@ -0,0 +1,12 @@
import { defineConfig } from "vite";
import optimizer from "vite-plugin-optimizer";
import { nodePolyfills } from "vite-plugin-node-polyfills";
export default defineConfig({
define: {viteDefine},
build: {viteBuild},
resolve: {viteResolve},
plugins: [
optimizer({viteOptimize}),
nodePolyfills({vitePolyfill}),
],
});