@ckeditor/ckeditor5-dev-webpack-plugin
Version:
CKEditor 5 plugin for webpack.
20 lines (16 loc) • 605 B
JavaScript
/**
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md.
*/
;
/**
* Very simple loader that runs the translateSource function only on the source.
* translateSource is provided by the CKEditorWebpackPlugin.
*
* @param {String} source Content of the resource file
* @param {Object} map A source map consumed by the `source-map` package.
*/
module.exports = function translateSourceLoader( source, map ) {
const output = this.query.translateSource( source, this.resourcePath );
this.callback( null, output, map );
};