Write Assets Webpack Plugin
Force webpack-dev-server/webpack-dev-middleware/webpack-hot-middleware program to write bundle files to the file system.
webpack-dev-server (even when you use
webpack-dev-middleware/webpack-hot-middleware) doesn't write files to disk.
If you want to force webpack-dev-server to write to the file system, you can use this plugin.
npm i --save-dev write-assets-webpack-plugin
yarn add --dev write-assets-webpack-plugin
const WriteAssetsWebpackPlugin = ;...// Webpack configurationmoduleexports =entry: 'index.js'output:path: __dirname + '/dist'filename: 'bundle.js'...plugins:force: true extension: 'js'
- Fork the repository and make changes on your fork in a feature branch.
- Commit messages must start with a capitalized and short summary.
- After every commit, make sure the test suite passes.
$ yarn run build:test$ yarn run test
- To ensure consistency throughout the source code, keep these coding styles.
$ yarn run lint
- Or run development mode with eslint and babel auto transpiler
$ yarn run dev
- Before you submit your Pull Request (PR) consider the open or closed PR that relates to your submission.
Test local package
# Create verdaccio container$ docker-compose up# Register the first user for you$ npm adduser --registry http://localhost:4873# Publishing the package locally$ npm publish --registry http://localhost:4873# Install package from locally registry$ npm install write-assets-webpack-plugin --registry http://localhost:4873