Skip to content

Commit f843586

Browse files
committed
Import DXT SCSS
1 parent 9eb87f9 commit f843586

5 files changed

Lines changed: 18 additions & 85 deletions

File tree

package-lock.json

Lines changed: 11 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"license": "OGL-UK-3.0",
4040
"dependencies": {
4141
"@babel/runtime": "^7.26.0",
42-
"@defra/forms-engine-plugin": "^0.1.14",
42+
"@defra/forms-engine-plugin": "^0.1.15",
4343
"@defra/hapi-tracing": "^1.0.0",
4444
"@elastic/ecs-pino-format": "^1.5.0",
4545
"@hapi/bell": "^13.1.0",
@@ -123,7 +123,7 @@
123123
"tsx": "^4.19.2",
124124
"typescript": "^5.6.3",
125125
"webpack": "^5.96.1",
126-
"webpack-assets-manifest": "^5.2.1",
126+
"webpack-assets-manifest": "^6.0.2",
127127
"webpack-cli": "^5.1.4"
128128
}
129129
}

src/client/stylesheets/application.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
@use 'govuk-frontend';
1+
@use 'pkg:@defra/forms-engine-plugin';
2+
@use 'pkg:govuk-frontend';
23

34
@use 'variables';
45
@use 'helpers';

src/server/common/helpers/serve-static-files.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ export const serveStaticFiles = {
1717
name: 'staticFiles',
1818
register(server) {
1919
server.route([
20-
{
21-
method: 'GET',
22-
path: '/stylesheets/application.min.css',
23-
handler: {
24-
file: './stylesheets/dxt-application.min.css'
25-
},
26-
options
27-
},
2820
{
2921
method: 'GET',
3022
path: '/javascripts/application.min.js',

webpack.config.js

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createRequire } from 'node:module'
44
import { fileURLToPath } from 'node:url'
55
import path from 'path'
66
import TerserPlugin from 'terser-webpack-plugin'
7-
import WebpackAssetsManifest from 'webpack-assets-manifest'
7+
import { WebpackAssetsManifest } from 'webpack-assets-manifest'
88

99
const { NODE_ENV = 'development' } = process.env
1010

@@ -15,10 +15,6 @@ const govukFrontendPath = path.dirname(
1515
require.resolve('govuk-frontend/package.json')
1616
)
1717

18-
const defraFormsPath = path.dirname(
19-
require.resolve('@defra/forms-engine-plugin/package.json')
20-
)
21-
2218
const ruleTypeAssetResource = 'asset/resource'
2319

2420
/**
@@ -115,7 +111,8 @@ export default {
115111
loadPaths: [
116112
path.join(dirname, 'src/client/stylesheets'),
117113
path.join(dirname, 'src/server/common/components'),
118-
path.join(dirname, 'src/server/common/templates/partials')
114+
path.join(dirname, 'src/server/common/templates/partials'),
115+
path.join(dirname, 'node_modules')
119116
],
120117
quietDeps: true,
121118
sourceMapIncludeSources: true,
@@ -186,21 +183,11 @@ export default {
186183
from: path.join(govukFrontendPath, 'dist/govuk/assets'),
187184
to: 'assets'
188185
},
189-
{
190-
from: require.resolve(
191-
'@defra/forms-engine-plugin/application.min.css'
192-
),
193-
to: 'stylesheets/dxt-application.min.css'
194-
},
195186
{
196187
from: require.resolve(
197188
'@defra/forms-engine-plugin/application.min.js'
198189
),
199190
to: 'javascripts/dxt-application.min.js'
200-
},
201-
{
202-
from: path.join(defraFormsPath, '.public/assets'),
203-
to: 'dxt-assets'
204191
}
205192
]
206193
})

0 commit comments

Comments
 (0)