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

Feature: provide Options Type as export to webpack plugin #28

Closed
ntucker opened this issue Dec 9, 2023 · 0 comments · Fixed by #32
Closed

Feature: provide Options Type as export to webpack plugin #28

ntucker opened this issue Dec 9, 2023 · 0 comments · Fixed by #32
Labels
bundler: webpack 📦 Issue is related to webpack bundler enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed feature: proposal 💬 New feature proposal that needs to be discussed

Comments

@ntucker
Copy link

ntucker commented Dec 9, 2023

Describe the enhancement

Easy way to know and use the type of the webpack plugin.

Motivation

used to be able to do
import { PluginOptions } from '@wyw-in-js/babel-preset'; to get the webpack options, but now that's not even possible.

mini-css-extract-plugin does the following

import { PluginOptions } from 'mini-css-extract-plugin';

sass-loader does

import type { Options } from 'sass-loader';

I use these to construct options for my webpack config that pre-includes the best plugins in the ecosystem (including linaria/www-in-js) (see https://github.com/ntucker/anansi/blob/master/packages/webpack-config-anansi/index.d.ts)

Possible implementations

import { PluginOptions } from '@wyw-in-js/webpack';

@ntucker ntucker added the enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed label Dec 9, 2023
@Anber Anber added bundler: webpack 📦 Issue is related to webpack bundler needs: triage 🏷 Issue needs to be checked and prioritized and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Dec 9, 2023
@layershifter layershifter added feature: proposal 💬 New feature proposal that needs to be discussed and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Dec 29, 2023
@layershifter layershifter changed the title Provide Options Type as export to webpack plugin Feature: provide Options Type as export to webpack plugin Dec 29, 2023
@Anber Anber closed this as completed in #32 Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bundler: webpack 📦 Issue is related to webpack bundler enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed feature: proposal 💬 New feature proposal that needs to be discussed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants