@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.
Files changed (2) hide show
  1. package/index.js +2 -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(path.join(process.cwd(), 'auto' === output.publicPath ? 'public' : output.publicPath ), this.config );
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="${compiler.options.output.publicPath}/a11y.update.js"></script>\n</head>`)
146
+ pageContent.toString().replace('</head>', `<script src="./a11y.update.js"></script>\n</head>`)
147
147
  )
148
148
  }
149
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caweb/a11y-webpack-plugin",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "CAWebPublishing Webpack Plugin to run Accessibility Scans",
5
5
  "type": "module",
6
6
  "main": "index.js",