aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authoreric <thul.eric@gmail.com>2017-02-25 10:30:44 -0500
committerGitHub <noreply@github.com>2017-02-25 10:30:44 -0500
commit936a04b591f649dbff2a65bbbd291913fc42502d (patch)
treeb426fce8d295591d60ce94c54a157a324e100ffb /README.md
parenta3c358f80f8197d5a1d05e42916cd5593b5b2dd5 (diff)
parent806d2915e6579d3dce38de8f2b40b85466ceda05 (diff)
downloadpurs-loader-936a04b591f649dbff2a65bbbd291913fc42502d.tar.gz
purs-loader-936a04b591f649dbff2a65bbbd291913fc42502d.tar.zst
purs-loader-936a04b591f649dbff2a65bbbd291913fc42502d.zip
Merge pull request #84 from ethul/topic/error-handling
Topic/error handling
Diffstat (limited to 'README.md')
-rw-r--r--README.md32
1 files changed, 28 insertions, 4 deletions
diff --git a/README.md b/README.md
index 3b31354..91ccfc0 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,7 @@ const loaderConfig = {
61 bundleNamespace: 'PS', 61 bundleNamespace: 'PS',
62 bundle: false, 62 bundle: false,
63 warnings: true, 63 warnings: true,
64 watch: false, // indicates if webpack is in watch mode
64 output: 'output', 65 output: 'output',
65 src: [ 66 src: [
66 path.join('src', '**', '*.purs'), 67 path.join('src', '**', '*.purs'),
@@ -79,8 +80,14 @@ via the `pscIde: true` option.
79You can use an already running `psc-ide-server` instance by specifying the port in `pscIdeArgs`, 80You can use an already running `psc-ide-server` instance by specifying the port in `pscIdeArgs`,
80if there is no server running this loader will start one for you. 81if there is no server running this loader will start one for you.
81 82
83### `psc-package` support (experimental)
84
85Set `pscPackage` query parameter to `true` to enable `psc-package` support. The `psc-package`-supplied source paths
86will be appended to `src` parameter.
87
88### Troubleshooting
82 89
83#### Slower webpack startup after using purs-loader ? 90#### Slower webpack startup after enabling psc-ide support?
84 91
85By default, the psc-ide-server will be passed the globs from query.src, this is 92By default, the psc-ide-server will be passed the globs from query.src, this is
86helpful for other tools using psc-ide-server (for example IDE plugins), however 93helpful for other tools using psc-ide-server (for example IDE plugins), however
@@ -88,7 +95,24 @@ it might result in a slower initial webpack startup time (rebuilds are not
88affected). To override the default behaviour, add: 95affected). To override the default behaviour, add:
89`pscIdeServerArgs: { "_": ['your/*globs/here'] }` to the loader config 96`pscIdeServerArgs: { "_": ['your/*globs/here'] }` to the loader config
90 97
91### `psc-package` support (experimental) 98#### Errors not being displayed in watch mode?
92 99
93Set `pscPackage` query parameter to `true` to enable `psc-package` support. The `psc-package`-supplied source paths 100When the `watch` option is set to `true`, psc errors are appended to
94will be appended to `src` parameter. 101webpack's compilation instance errors array and not passed back as an
102error to the loader's callback. This may result in the error not being
103reported by webpack. To display errors, the following plugin may be added
104to the webpack config.
105
106```javascript
107const webpackConfig = {
108 // ...
109 plugins: [
110 function(){
111 this.plugin('done', function(stats){
112 process.stderr.write(stats.toString('errors-only'));
113 });
114 }
115 ]
116 // ...
117}
118```