Skip to content

Commit

Permalink
Allow to overwrite options
Browse files Browse the repository at this point in the history
  • Loading branch information
andys8 committed Aug 7, 2020
1 parent 270787c commit 108be1b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const throwError = (message, githubIssueQuery) =>
});

module.exports = {
overrideWebpackConfig: ({ webpackConfig }) => {
overrideWebpackConfig: ({ webpackConfig, pluginOptions }) => {
// Resolve purescript extension
if (
!webpackConfig ||
Expand All @@ -44,15 +44,16 @@ module.exports = {
);

// PureScript loader
const defaultOptions = {
spago: true,
pscIde: true,
watch: isWebpackDevServer || isWatch,
};
const pursLoader = {
loader: "purs-loader",
test: /\.purs$/,
exclude: /node_modules/,
query: {
spago: true,
pscIde: true,
watch: isWebpackDevServer || isWatch,
},
query: Object.assign({}, defaultOptions, pluginOptions),
};

// Append purs-loader before file-loader
Expand Down

0 comments on commit 108be1b

Please sign in to comment.