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

feat: support hash for resolve options #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{fmt, path::PathBuf};
/// Options are directly ported from [enhanced-resolve](https://github.com/webpack/enhanced-resolve#resolver-options).
///
/// See [webpack resolve](https://webpack.js.org/configuration/resolve/) for information and examples
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Hash)]
pub struct ResolveOptions {
/// Path to TypeScript configuration file.
///
Expand Down Expand Up @@ -374,7 +374,7 @@ impl ResolveOptions {
}

/// Value for [ResolveOptions::enforce_extension]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum EnforceExtension {
Auto,
Enabled,
Expand Down Expand Up @@ -418,7 +418,7 @@ where
}

/// Value for [ResolveOptions::restrictions]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Hash)]
pub enum Restriction {
Path(PathBuf),
RegExp(String),
Expand All @@ -427,7 +427,7 @@ pub enum Restriction {
/// Tsconfig Options for [ResolveOptions::tsconfig]
///
/// Derived from [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin#options)
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Hash)]
pub struct TsconfigOptions {
/// Allows you to specify where to find the TypeScript configuration file.
/// You may provide
Expand All @@ -440,7 +440,7 @@ pub struct TsconfigOptions {
}

/// Configuration for [TsconfigOptions::references]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Hash)]
pub enum TsconfigReferences {
Disabled,
/// Use the `references` field from tsconfig of `config_file`.
Expand Down
Loading