mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-01 15:45:58 +09:00
18 lines
379 B
TypeScript
18 lines
379 B
TypeScript
/**
|
|
* Inject license
|
|
*/
|
|
|
|
const StringReplacePlugin = require('string-replace-webpack-plugin');
|
|
import { licenseHtml } from '../../../src/common/build/license';
|
|
|
|
export default () => ({
|
|
enforce: 'pre',
|
|
test: /\.(tag|js)$/,
|
|
exclude: /node_modules/,
|
|
loader: StringReplacePlugin.replace({
|
|
replacements: [{
|
|
pattern: '%license%', replacement: () => licenseHtml
|
|
}]
|
|
})
|
|
});
|