Use babel relative import path

This commit is contained in:
Peng-YM
2022-06-16 14:24:26 +08:00
parent 6bfe2700cf
commit 8fe2280232
21 changed files with 396 additions and 198 deletions

View File

@@ -43,7 +43,20 @@ function scripts(src, dest) {
return () => {
return browserify(src)
.transform('babelify', {
presets: [['@babel/preset-env']]
presets: [['@babel/preset-env']],
plugins: [
[
'babel-plugin-relative-path-import',
{
paths: [
{
'rootPathPrefix': '@',
'rootPathSuffix': 'src',
}
]
}
]
]
})
.plugin('tinyify')
.bundle()