1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-16 23:58:54 +09:00
MisskeyIO/webpack/module/rules/license.ts

18 lines
379 B
TypeScript
Raw Normal View History

2017-12-11 03:38:31 +09:00
/**
* Inject license
*/
const StringReplacePlugin = require('string-replace-webpack-plugin');
2018-01-01 02:08:41 +09:00
import { licenseHtml } from '../../../src/common/build/license';
2017-12-11 03:38:31 +09:00
export default () => ({
enforce: 'pre',
2018-02-15 01:07:09 +09:00
test: /\.(vue|js)$/,
2017-12-11 03:38:31 +09:00
exclude: /node_modules/,
loader: StringReplacePlugin.replace({
replacements: [{
2018-01-01 02:08:41 +09:00
pattern: '%license%', replacement: () => licenseHtml
2017-12-11 03:38:31 +09:00
}]
})
});