@caweb/a11y-webpack-plugin 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -135,7 +135,7 @@ class A11yPlugin {
|
|
|
135
135
|
|
|
136
136
|
console.log(`<i> ${boldGreen('[webpack-dev-middleware] Running IBM Accessibility scan...')}`);
|
|
137
137
|
|
|
138
|
-
let result = this.a11yCheck(
|
|
138
|
+
let result = this.a11yCheck('auto' === output.publicPath ? output.path : output.publicPath, this.config );
|
|
139
139
|
|
|
140
140
|
if( result ){
|
|
141
141
|
// we have to inject the a11y.update.js file into the head in order for the webpack-dev-server scripts to load.
|
|
@@ -143,7 +143,7 @@ class A11yPlugin {
|
|
|
143
143
|
|
|
144
144
|
fs.writeFileSync(
|
|
145
145
|
path.join(staticDir.directory, `${this.config.outputFilename}.html`),
|
|
146
|
-
pageContent.toString().replace('</head>', `<script src="
|
|
146
|
+
pageContent.toString().replace('</head>', `<script src="./a11y.update.js"></script>\n</head>`)
|
|
147
147
|
)
|
|
148
148
|
}
|
|
149
149
|
|