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

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: /\.(vue|js)$/,
exclude: /node_modules/,
loader: StringReplacePlugin.replace({
replacements: [{
pattern: '%license%', replacement: () => licenseHtml
}]
})
});