Builds the Enact framework into a standalone library bundle.
Recommended for usage via the framework
mixin rather than directly. See the If used directly, it will map modules to string reprentations of the import-paths, in a DLL-like format. See the frameworks mixin to see an example of webpack config settings that go along with the plugin in an optimal manner.
npm install --save-dev @enact/dev-utils
In a framework-specific webpack.config.js
:
const {EnactFrameworkPlugin} = require('@enact/dev-utils');
// ...
plugins: [
new EnactFrameworkPlugin(),
],
You can pass configuration settings to EnactFrameworkRefPlugin
.
Allowed values are as follows:
polyfill
: Filepath to an optional polyfill module to include in the enact framework bundle as@enact/polyfill
. Any underlyingcore-js
modules will also be organized for easy access.
Builds an app able to use an external Enact framework library bundle.
Recommended for usage via the externals
mixin rather than directly. See the If used directly, it will use an external library bundle for Enact/React modules. See the externals mixin to see an example of webpack config settings that go along with the plugin in an optimal manner.
npm install --save-dev @enact/dev-utils
In your webpack.config.js
:
const {EnactFrameworkRefPlugin} = require('@enact/dev-utils');
// ...
plugins: [
new EnactFrameworkRefPlugin();
],
You can pass configuration settings to EnactFrameworkRefPlugin
.
Allowed values are as follows:
name
: Global-exposed name of enact library bundle. Defaults to'enact_framework'
.libraries
: Packages or package scopes to reference from the external library bundle. Defaults to['@enact', 'react', 'react-dom', 'react-dom/client', 'react-dom/server']
.polyfill
: Filepath to a polyfill module to delegate out as@enact/polyfill
.externals
: Object containing external properties. SupportspublicPath
: Public path the externals will be found at during runtime.snapshot
: Whether or not the external library bundle is in v8 snapshot format.