Skip to content

Commit 45183bc

Browse files
authored
Merge pull request #115 from NHSDigital/feature/113-deprecated-components
Fix for importing deprecated components
2 parents 3cfc4c0 + 29e27fa commit 45183bc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/upgrade-to-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import { Button, Panel, Promo } from "nhsuk-react-components";
6363

6464
// New Imports
6565
import { Button } from "nhsuk-react-components";
66-
import { Panel, Promo } from "nhsuk-react-components/deprecated";
66+
import { Panel, Promo } from "nhsuk-react-components/dist/deprecated";
6767
```
6868

6969
A warning is printed to the console in dev environments when using these components, as they are set to be removed in the next major release.

rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import commonjs from '@rollup/plugin-commonjs';
12
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
23
import resolve from '@rollup/plugin-node-resolve';
3-
import commonjs from '@rollup/plugin-commonjs';
44
import typescript from 'rollup-plugin-typescript2';
55

66
// eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -23,7 +23,7 @@ export default [
2323
plugins,
2424
},
2525
{
26-
input: 'src/index.ts',
26+
input: 'src/deprecated/index.ts',
2727
output: [
2828
{ file: 'dist/deprecated.js', format: 'cjs', sourcemap: true },
2929
{ file: 'dist/deprecated.es.js', format: 'esm', sourcemap: true },

0 commit comments

Comments
 (0)