build.js: Fix escape characters

Spotted by ESLint when calling it on build.js itself (which the esbuild
integration didn't).
This commit is contained in:
Martin Pitt 2024-02-07 16:43:38 +01:00 committed by Martin Pitt
parent 39014f29e8
commit ad0a653f82

View file

@ -95,8 +95,8 @@ const context = await esbuild.context({
target: ['es2020'], target: ['es2020'],
plugins: [ plugins: [
cleanPlugin(), cleanPlugin(),
...args.no_stylelint ? [] : [stylelintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(css?|scss?)$') })], ...args.no_stylelint ? [] : [stylelintPlugin({ filter: new RegExp(cwd + '/src/.*\\.(css?|scss?)$') })],
...args.no_eslint ? [] : [eslintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(jsx?|js?)$') })], ...args.no_eslint ? [] : [eslintPlugin({ filter: new RegExp(cwd + '/src/.*\\.(jsx?|js?)$') })],
// Esbuild will only copy assets that are explicitly imported and used // Esbuild will only copy assets that are explicitly imported and used
// in the code. This is a problem for index.html and manifest.json which are not imported // in the code. This is a problem for index.html and manifest.json which are not imported
copy({ copy({