Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

craco-alias

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

craco-alias - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "craco-alias",
"version": "1.0.3",
"version": "1.0.4",
"description": "A craco plugin for automatic aliases generation",

@@ -5,0 +5,0 @@ "main": "plugin/index.js",

@@ -6,4 +6,11 @@ # craco-alias

A craco plugin for automatic aliases generation for Webpack and Jest.
A [craco](https://github.com/sharegate/craco) plugin for automatic aliases generation for Webpack and Jest.
## List of Contents
- [Installation](#installation)
- [Options](#options)
- [Examples](#examples)
- [Migrating from cra-alias](#migrating-from-cra-alias)
### Installation

@@ -61,2 +68,4 @@

```js
/* craco.config.js */
const CracoAlias = require("craco-alias");

@@ -159,1 +168,51 @@

</details>
### Migrating from [cra-alias](https://github.com/risenforces/cra-alias)
1. Install `craco` and `craco-alias`:
```sh
npm i -D @craco/craco craco-alias
```
2. Create a `craco.config.js` file in the root directory:
> See `tsconfig` example in the [Examples](#examples) section
```js
/* craco.config.js */
const CracoAlias = require("craco-alias");
module.exports = {
plugins: [
{
plugin: CracoAlias,
options: {
source: "jsconfig"
}
}
]
};
```
3. Update the existing calls to `cra-alias` in the `scripts` section of your `package.json` file to use the `craco` CLI:
```diff
/* package.json */
"scripts": {
- "start": "cra-alias start",
+ "start": "craco start",
- "build": "cra-alias build",
+ "build": "craco build"
- "test": "cra-alias test",
+ "test": "craco test"
}
```
4. Done! You can also remove `cra-alias`:
```sh
npm r -D cra-alias
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc