1.1.2 • Published 8 months ago

@atlascommunity/tsconfig-base v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Atlas Community Base tsconfig

Installation

yarn add --dev @atlascommunity/tsconfig-base

In tsconfig.json add row:

  "extends": "@atlascommunity/tsconfig-base"

Migration from v1.0.9 to v1.1.0

tsconfig.json

  • Remove module and noEmit fields in your tsconfig

webpack.config.js

  • Change the ts-loader to:
{
  test: /\.(ts|tsx)$/,
  use: [{
    loader: 'ts-loader',
    options: { compilerOptions: { noEmit: false } },
  }],
  exclude: /node_modules/,
},
  • Change the css-loader to:
// This will allow you to use regular css import in conjunction with modules
{
  loader: 'css-loader',
    options: {
    esModule: true,
      modules: {
      namedExport: true,
      auto: /\.module\.\w+$/i,
    },
  },
},
  • Add a field after module
// This will prevent unnamed dependency imports
module: {
  strictExportPresence: true,
  // rules { ...
}
  • If you are using modules in your project, add this to your .d.ts file
declare module "*.module.css" {
  const content: Record<string, string>;
  export = content;
}

declare module "*.module.pcss" {
  const content: Record<string, string>;
  export = content;
}

package.json

  • If your package.json uses the sideEffects field, remove it
  • Update your typescript to the latest version (^5.6.*)

New rules for using named module imports

Old import:

import styles from './file.module.css'

New import:

import * as styles from './file.module.css'
1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.1.0-alpha-4

9 months ago

1.1.0-alpha-1

9 months ago

1.1.0-alpha-2

9 months ago

1.1.0-alpha-3

9 months ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago