A simple webpack builder for react
ll-script
a simple webpack builder for react
feat
- support mock
- support customize webpack config
install
yarn add ll-script -D
use
Update the scripts section of your package.json file to use the ll-script CLI
/* package.json */
"scripts": {
"start": "ll-script start",
"build": "ll-script",
}
customize webpack config
add ll.config.js in your project root.
module.exports = {
webpackConfig: (prevConfig, { isDev, isBuild }) => {
//the best way is use webpack-merge to merge webpack config
return prevConfig
}
}
mock
now, mock data api is a simple feature. add mock/index.json
file in your project root,
the structure of it like following.
{
"mock":true,//mock open or close
}