1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// @ts-check module.exports = function (opts) { opts = opts || {} var method = opts.method || 'replace' return { postcssPlugin: 'postcss-replace-overflow-wrap', Declaration: { 'overflow-wrap': decl => { decl.cloneBefore({ prop: 'word-wrap' }) if (method === 'replace') { decl.remove() } } } } } module.exports.postcss = true