How to use the @dojo/webpack-contrib/i18n-plugin/I18nPlugin function in @dojo/webpack-contrib

To help you get started, we’ve selected a few @dojo/webpack-contrib 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 dojo / cli-build-app / src / base.config.ts View on Github external
}),
			singleBundle &&
				new webpack.optimize.LimitChunkCountPlugin({
					maxChunks: 1
				}),
			new CssModulePlugin(basePath),
			new MiniCssExtractPlugin({
				filename: '[name].css'
			}),
			(args.externals || isTest) &&
				new WrapperPlugin({
					test: singleBundle ? new RegExp(`${mainEntry}.*(\.js$)`) : new RegExp(`${bootstrapEntry}.*(\.js$)`),
					footer: `\ntypeof define === 'function' && define.amd && require(['${libraryName}']);`
				}),
			args.locale &&
				new I18nPlugin({
					defaultLocale: args.locale,
					supportedLocales: args.supportedLocales,
					cldrPaths: args.cldrPaths,
					target: mainEntryPath
				}),
			new webpack.DefinePlugin({
				__MAIN_ENTRY: JSON.stringify(mainEntryPath),
				__DOJO_SCOPE: `'${libraryName}'`
			}),
			!isExperimentalSpeed &&
				new OptimizeCssAssetsPlugin({
					cssProcessor: cssnano,
					cssProcessorOptions: {
						map: {
							inline: false
						}