How to use the @talend/react-components/lib/AppLoader/constant.default.APP_LOADER function in @talend/react-components

To help you get started, we’ve selected a few @talend/react-components examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Talend / data-prep / dataprep-webapp / config / webpack.config.js View on Github external
};

if (!isTestMode) {
	config.plugins = config.plugins.concat([
		CopyWebpackPlugin([
			{ from: 'src/assets/images', to: 'assets/images' },
			{ from: 'src/assets/config/config.json', to: 'assets/config' },
		]),
		new HtmlWebpackPlugin({
			filename: './index.html',
			template: INDEX_TEMPLATE_PATH,
			title: APP_CONF.title,
			rootElement: APP_CONF.rootElement,
			rootModule: APP_CONF.rootModule,
			inject: 'body',
			loader: AppLoader.APP_LOADER,
			// ensure loding order vendor/style/app
			chunksSortMode: (a, b) => {
				const aOrder = CHUNKS_ORDER.indexOf(a.names[0]);
				const bOrder = CHUNKS_ORDER.indexOf(b.names[0]);
				if (aOrder > bOrder) {
					return 1;
				}
				if (aOrder < bOrder) {
					return -1;
				}
				return 0;
			},
		}),
		new TalendHTML({
			loadCSSAsync: true,
			appLoaderIcon: APP_CONF.icon,
github Talend / ui / packages / scripts / webapp / preset / config / webpack.config.js View on Github external
options: {
						name: './fonts/[name].[ext]',
						limit: 10000,
						mimetype: 'application/font-woff',
					},
				},
			],
		},
		plugins: [
			new MiniCssExtractPlugin({
				filename: '[name]-[hash].css',
			}),
			new HtmlWebpackPlugin({
				filename: './index.html',
				template: `${process.cwd()}/src/app/index.html`,
				appLoader: AppLoader.APP_LOADER,
				...getUserConfig('html'),
			}),
			new TalendHTML({
				loadCSSAsync: true,
				appLoaderIcon: getUserConfig(['html', 'appLoaderIcon'], DEFAULT_APP_LOADER_ICON),
			}),
			new CopyWebpackPlugin([
				{ from: 'src/assets' },
			]),
			new webpack.BannerPlugin({
				banner: LICENSE_BANNER,
			}),
		],
	};
};