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