1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-30 15:58:24 +09:00
misskey/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
}]
})
});