Skip to content

Commit 6c26276

Browse files
committed
refactor: to esm syntax
1 parent 1ba4e57 commit 6c26276

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/index.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const qs = require('query-string')
2-
const isUrl = require('is-url-superb')
3-
const matchHelper = require('posthtml-match-helper')
1+
import qs from 'query-string'
2+
import isUrl from 'is-url-superb'
3+
import matchHelper from 'posthtml-match-helper'
44

5-
module.exports = (config = {}) => tree => {
5+
const plugin = (config = {}) => tree => {
66
config.strict = typeof config.strict === 'boolean' ? config.strict : true
77

88
const process = node => {
@@ -49,3 +49,5 @@ module.exports = (config = {}) => tree => {
4949
resolve(tree)
5050
})
5151
}
52+
53+
export default plugin

0 commit comments

Comments
 (0)