stable
Clone or download
The main goal of this contribution is to make possible to bundle app with stylesheets with Vite. Vite expects the main entrypoint to define the stylesheets to load so it excludes them from the manifets files as root entries. This is fine for most cases where we can tell the app to load the stylesheets. There is a few cases in Tuleap where this is not possible (mostly global themes/"framework") which we will need additional work to be built with Vite. There is however no need at this point but it could be handled in a similar way than what vite_ruby does with a custom manifest plugin [0]. The warning that is now visible when buiding the API Explorer is due to a IE7 workaround and will be removed the next time we update swagger-ui [1] (and they rebuild their distributed files). No functionnal changes expected. Part of request #23415: Allow to bundle app with Vite [0] https://github.com/ElMassimo/vite_ruby/blob/vite-plugin-ruby%403.0.3/vite-plugin-ruby/src/manifest.ts [1] https://github.com/swagger-api/swagger-ui/pull/7526 Change-Id: I5e6b13756d3c4fbff99439b470fdb795a8ab7b72
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/api_explorer/include/ExplorerController.php | +4 | −12 | Go to diff View file |
M | plugins/api_explorer/include/api_explorerPlugin.php | +1 | −1 | Go to diff View file |
M | plugins/api_explorer/package.json | +2 | −2 | Go to diff View file |
M | plugins/api_explorer/scripts/index.tsx | +1 | −0 | Go to diff View file |
M | plugins/api_explorer/tests/unit/ExplorerControllerTest.php | +3 | −6 | Go to diff View file |
R | plugins/api_explorer/webpack.prod.js | Go to diff View file | ||
D | plugins/api_explorer/webpack.common.js | +0 | −47 | Go to diff View file |
M | src/common/layout/BaseLayout.php | +8 | −4 | Go to diff View file |
M | src/common/layout/CssAsset.php | +2 | −2 | Go to diff View file |
M | src/common/layout/CssAssetCollection.php | +12 | −7 | Go to diff View file |
R | plugins/api_explorer/webpack.dev.js | Go to diff View file | ||
A | src/common/layout/CssViteAsset.php | +51 | −0 | Go to diff View file |
M | src/common/layout/IncludeViteAssets.php | +20 | −0 | Go to diff View file |
M | src/common/layout/JavascriptAsset.php | +6 | −11 | Go to diff View file |
A | src/common/layout/JavascriptAssetGeneric.php | +39 | −0 | Go to diff View file |
A | src/common/layout/JavascriptViteAsset.php | +41 | −0 | Go to diff View file |
M | src/common/layout/Layout.class.php | +23 | −5 | Go to diff View file |
M | src/themes/BurningParrot/include/BurningParrotTheme.php | +23 | −5 | Go to diff View file |
M | src/themes/BurningParrot/include/FooterPresenter.php | +4 | −4 | Go to diff View file |
M | src/themes/BurningParrot/include/HeaderPresenterBuilder.php | +19 | −14 | Go to diff View file |
M | src/themes/BurningParrot/include/JavascriptPresenter.php | +5 | −10 | Go to diff View file |
M | src/themes/BurningParrot/templates/footer.mustache | +4 | −1 | Go to diff View file |
M | src/www/themes/FlamingParrot/FlamingParrot_Theme.class.php | +10 | −2 | Go to diff View file |
M | tests/lib/Builders/TestLayout.php | +8 | −0 | Go to diff View file |
M | tests/unit/common/Layout/CssAssetCollectionTest.php | +30 | −24 | Go to diff View file |
A | tests/unit/common/Layout/CssViteAssetTest.php | +87 | −0 | Go to diff View file |
M | tests/unit/common/layout/LayoutTest.php | +16 | −4 | Go to diff View file |
M | tools/utils/scripts/vite-configurator.ts | +5 | −0 | Go to diff View file |