Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for vendor prefixed nwb plugins #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ammmze
Copy link

@ammmze ammmze commented Mar 15, 2018

I wanted to add support for vendor prefixed plugins with the idea being that I can essentially create a plugin or I guess more accurately it would be a preset for my company. So for example, I would add @mycompany/nwb-react-component to my dependencies which in turn would include the nwb-less and ideally any other webpack config changes I use at my company. So the main entry for the @mycompany/nwb-react-component would look something like this...

const merge = require('webpack-merge');
const lessPlugin = require('nwb-less');
const jsxPlugin = require('./jsx-plugin'); // TBD what this plugin would look like
module.exports = merge(lessPlugin, jsxPlugin);

Looking at the code it looks like the plugins currently have very limited effect on the build, so currently it looks like really I'll just be able to hook the nwb-less plugin there and thats about it. So i'll be looking into making some changes there to support setting up other things. For example, at my company we'd prefer to use .jsx file extensions, so we'll want to be able to add that to the list if extensions handled by the webpack babel plugin.

@ammmze
Copy link
Author

ammmze commented Mar 15, 2018

I've currently got this PR targeting master. I was gonna target next (like the PR default comment mentions), but that looks like it hasn't been updated since june last year.

src/config/plugin.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants