Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# unreleased

* `ViteHtmlPlugin`: Added a new plugin to render the HTML document for Vite builds, the counterpart to `HtmlWebpackPlugin`.
* `ViteILibPlugin`: Added a new plugin to define the `ILIB_*` constants and supply the iLib locale and resource data for Vite builds, with locale filtering support.
* `ViteWebOSMetaPlugin`: Added a new plugin to emit the webOS `appinfo.json` and its referenced assets for Vite builds.
* `mixins`: Added `applyVite` and the Vite mixins supporting `--isomorphic`, `--framework`/`--externals`, `--snapshot`, and the `--no-minify`/`--verbose`/`--stats` build options.

# 7.0.5 (June 23, 2026)

* `option-parser`: Set default theme config to `limestone`.
Expand Down
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ exportOnDemand({
PrerenderPlugin: () => require('./plugins/PrerenderPlugin'),
SnapshotPlugin: () => require('./plugins/SnapshotPlugin'),
VerboseLogPlugin: () => require('./plugins/VerboseLogPlugin'),
WebOSMetaPlugin: () => require('./plugins/WebOSMetaPlugin')
WebOSMetaPlugin: () => require('./plugins/WebOSMetaPlugin'),
ViteHtmlPlugin: () => require('./plugins/ViteHtmlPlugin'),
ViteILibPlugin: () => require('./plugins/ViteILibPlugin'),
ViteWebOSMetaPlugin: () => require('./plugins/ViteWebOSMetaPlugin')
});
3 changes: 2 additions & 1 deletion mixins/externals.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const path = require('path');
const helper = require('../config-helper');
const packageRoot = require('../package-root');
const EnactFrameworkRefPlugin = require('../plugins/dll/EnactFrameworkRefPlugin');
const {reactLibraries} = require('./framework-libraries');

module.exports = {
apply: function (config, opts = {}) {
Expand All @@ -13,7 +14,7 @@ module.exports = {
const htmlPluginInstance = helper.getPluginByName(config, 'HtmlWebpackPlugin');
const webOSMetaPluginInstance = helper.getPluginByName(config, 'WebOSMetaPlugin');

const libraries = ['@enact', 'react', 'react-dom', 'react-dom/client', 'react-dom/server', 'ilib'];
const libraries = ['@enact', ...reactLibraries, 'ilib'];

const app = packageRoot();
if (
Expand Down
21 changes: 21 additions & 0 deletions mixins/framework-libraries.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Shared constants for the framework/externals mixins (webpack `framework.js` +
// `externals.js` and the Vite `vite-framework.js`). The build ALGORITHMS differ per
// bundler (webpack DLL vs Vite import map), but these library lists are common.

// @enact packages that are build/test tooling — never part of the runtime framework
// bundle (excluded from the framework glob / specifier enumeration).
const nonRuntimeEnactPackages = [
'dev-utils',
'docs-utils',
'storybook-utils',
'ui-test-utils',
'screenshot-test-utils'
];

// The react packages bundled into / externalized to the shared framework.
const reactLibraries = ['react', 'react-dom', 'react-dom/client', 'react-dom/server'];

module.exports = {
nonRuntimeEnactPackages,
reactLibraries
};
9 changes: 3 additions & 6 deletions mixins/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const fastGlob = require('fast-glob');
const helper = require('../config-helper');
const packageRoot = require('../package-root');
const EnactFrameworkPlugin = require('../plugins/dll/EnactFrameworkPlugin');
const {nonRuntimeEnactPackages, reactLibraries} = require('./framework-libraries');

module.exports = {
apply: function (config, opts = {}) {
Expand All @@ -24,11 +25,7 @@ module.exports = {
'**/karma.conf.js',
'**/build/**/*.*',
'**/dist/**/*.*',
'**/@enact/dev-utils/**/*.*',
'**/@enact/docs-utils/**/*.*',
'**/@enact/storybook-utils/**/*.*',
'**/@enact/ui-test-utils/**/*.*',
'**/@enact/screenshot-test-utils/**/*.*',
...nonRuntimeEnactPackages.map(p => '**/@enact/' + p + '/**/*.*'),
'**/ilib/localedata/**/*.*',
path.join(config.output.path, '*'),
'**/node_modules/**/*.*',
Expand All @@ -52,7 +49,7 @@ module.exports = {
followSymbolicLinks: true
})
)
.concat(['react', 'react-dom', 'react-dom/client', 'react-dom/server'])
.concat(reactLibraries)
};
if (
app.meta.name.startsWith('@enact/') &&
Expand Down
6 changes: 6 additions & 0 deletions mixins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ module.exports = {
}

return config;
},
// Vite counterpart to `apply`: shapes a resolved Vite config from the same opts
// (--no-minify, --verbose, --stats). The webpack `apply` above can't be reused
// because it mutates webpack-specific config (plugins/minimizers/output).
applyVite: function (config, opts = {}) {
return require('./vite').apply(config, opts);
}
};
Loading
Loading