Skip to content

Commit

Permalink
set code block language to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxsan committed Sep 9, 2020
1 parent a869fca commit 96b07b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
8 changes: 2 additions & 6 deletions src/content/api/module-methods.md
Expand Up @@ -166,9 +166,7 @@ The goal of CommonJS is to specify an ecosystem for JavaScript outside the brows

### `require`

<!-- eslint-skip -->

``` javascript
```typescript
require(dependency: String);
```

Expand All @@ -184,9 +182,7 @@ W> Using it asynchronously may not have the expected effect.

### `require.resolve`

<!-- eslint-skip -->

``` javascript
```typescript
require.resolve(dependency: String);
```

Expand Down
13 changes: 4 additions & 9 deletions src/content/plugins/context-replacement-plugin.md
Expand Up @@ -4,6 +4,7 @@ contributors:
- simon04
- byzyk
- masives
- chenxsan
related:
- title: Issue 2783 - ContextReplacementPlugin Description
url: https://github.com/webpack/webpack/issues/2783#issuecomment-234137265
Expand All @@ -18,9 +19,7 @@ The `ContextReplacementPlugin` allows you to override the inferred information.

## Usage

<!-- eslint-skip -->

```javascript
```typescript
new webpack.ContextReplacementPlugin(
resourceRegExp: RegExp,
newContentResource?: string,
Expand All @@ -45,9 +44,7 @@ The `moment/locale` context is restricted to files matching `/de|fr|hu/`. Thus o

## Content Callback

<!-- eslint-skip -->

```javascript
```typescript
new webpack.ContextReplacementPlugin(
resourceRegExp: RegExp,
newContentCallback: (data) => void
Expand All @@ -74,9 +71,7 @@ new webpack.ContextReplacementPlugin(/^\.\/locale$/, (context) => {

The `newContentResource` and `newContentCreateContextMap` parameters are also available:

<!-- eslint-skip -->

```javascript
```typescript
new webpack.ContextReplacementPlugin(
resourceRegExp: RegExp,
newContentResource: string,
Expand Down

0 comments on commit 96b07b3

Please sign in to comment.