NOTE: This is raw example and it's mostly don't work. For now it's just a PoC
- Create a new project;
- Add
app-bootstrapperasdevDependency;
yarn add app-bootstrapper --dev- Add
app-bootstrappertoscriptssection in yourpackage.jsonfile:
{
"scripts": {
"start": "bootstrapper"
}
}You can use default app-bootstrapper configuration or if you want to modify it - create bootstrapper.config.js in the root of your project directory (near package.json).
module.exports = {
webpack: (config, options) => {
config.rules.push({ test: /.tsx?$/, use: 'ts-loader' })
config.plugins.push({ label: 'Test Plugin' })
return config
}
}Example of usage with plugins:
const withCSS = require('app-bootstrapper/plugins/bootstrapper-css')
const withTypeScript = require('app-bootstrapper/plugins/bootstrapper-typescript')
// module.exports = withCSS({})
module.exports = withTypeScript(withCSS({
webpack: (config, options) => {
// Override default config here
return config
}
}))