1.0.16 • Published 2 years ago

@faga/packtool v1.0.16

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@faga/packtool

A pack tool integrating webpack and rollup

start

install package npm install @faga/packtool

npm scripts

you can add npm scripts or install it globally

edit your package.json

"scripts": {
    "build": "pack"
 },

configure file

append packTool.config.js in your root directory like webpack.config.js

// the simplest configure file
module.exports = {
    entry:['./src/entry1.js'],
}

you can append plugin or loader in packTool.config.js,like this:

{
    entry:['./src/entry1.ts'],
    plugins:[plugin1],
    module:{
        rules:[
            {
                test:/\.js$/g,
                include:[loader1]
            }
        ]
    }
}

example

/src/entry
import {a} from './module/module1.js'
function sum(b){
    return a+b
}
/src/module/module1.js
export const a = 1;

run npm run build

you will get dist/output[entry1].js

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago