1
0
Fork 1
mirror of https://example.com synced 2024-11-27 16:36:48 +09:00
firefish/webpack/module/rules/license.ts
syuilo 88e4f1b287 ✌️
2018-01-01 02:08:41 +09:00

17 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
}]
})
});