Webpack

Contents

Overrides file

The path for the webpack overrides file is hardcoded to <Project.Dir>/webpack.config.react4xp.js

It is only used when building components.

There should be an updated example file in the @enonic/react4xp package under examples/webpack.config.react4xp.js

Cache

To improve the speed of incremental builds, you may use webpack caching.

Example:

<Project.Dir>/webpack.config.react4xp.js
module.exports = function(env, config) {

	if (process.env.NODE_ENV === 'development') {
		config.cache = {
			type: 'filesystem'
		}
	}

	return config;
};

Contents

Contents

AI-powered search

Juke AI