Package Exports
- write-file-webpack-plugin
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (write-file-webpack-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
write-file-webpack-plugin
Forces webpack-dev-server
program to write bundle files to the file system.
This plugin has no effect when webpack
program is used.
Install
npm install write-file-webpack-plugin --save-dev
Usage
Configure webpack.config.js
to use the write-file-webpack-plugin
plugin.
You must add outputPath
property to the devServer
configuration (For explanation see https://github.com/gajus/write-file-webpack-plugin/issues/1). devServer.outputPath
value must be equal to output.path
configuration value.
import path from 'path';
import WriteFilePlugin from 'write-file-webpack-plugin';
export default {
devServer: {
outputPath: path.join(__dirname, './dist')
},
output: {
path: path.join(__dirname, './dist')
},
plugins: [
new WriteFilePlugin()
],
// ...
}
See ./sandbox for a working webpack
configuration.