- Boilerplate for React - Mobx - Webpack
- Hot reload, build for dev and production
npm install
oryarn install
- Develop in the
src
directory - Use
npm run start
andnpm run build-web
for hot-reloading and packing, respectively
- Develop in the
src
directory - Use
npm run start
andnpm run build-node
for hot-reloading and packing, respectively
- The Workbench will emulate an environment where your module is part of a larger application
- Hot-reloading will still work, speeding up development time
- The workbench directory is excluded from npm via .npmignore
- Switch to the workbench directory
npm install
oryarn install
- Follow the configuration instructions below (the Workbench will run out of the box)
- Modify the entry point in
webpack.config.js
to yoursrc
entry point- Note: The package name is taken from the parent
package.json
- Note: The package name is taken from the parent
- Import your parent package normally in your workbench
- See
workbench/src/js/index.js
for an example
- See
- Ensure the parent
package.json
main key is pointing to the bundled .js file in the parent dist folder (after building)
- Develop in the
src
directory - Use
npm run build-module
for packing - Use
npm wstart
in parent directory to start the dev server, or - Change into the workbench directory and use
npm start
to start the dev server- Note: Don't run
npm run start
from the parent diretory, as your module most likely wont have the correct html files to render on the page
- Note: Don't run