Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
glromeo committed Sep 1, 2023
2 parents f30cd94 + 5b266bf commit faba7c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-sass-plugin",
"version": "2.13.0",
"version": "2.14.0",
"description": "esbuild plugin for sass/scss files supporting both css loader and css result import (lit-element)",
"main": "lib/index.js",
"keywords": [
Expand Down
6 changes: 2 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,12 @@ function requireTool(module: string, basedir?: string) {
}

const cssTextModule = cssText => `\
export default \`
${cssText.replace(/([$`\\])/g, '\\$1')}\`;
export default \`${cssText.replace(/([$`\\])/g, '\\$1')}\`;
`

const cssResultModule = cssText => `\
import {css} from "lit-element/lit-element.js";
export default css\`
${cssText.replace(/([$`\\])/g, '\\$1')}\`;
export default css\`${cssText.replace(/([$`\\])/g, '\\$1')}\`;
`

const styleModule = (cssText: string, nonce?: string) => nonce ? `\
Expand Down
4 changes: 2 additions & 2 deletions test/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe('e2e tests', function () {
};
`)

expect(bundle).to.have.string('var hello_world_default = i`\n' +
expect(bundle).to.have.string('var hello_world_default = i`' +
'.banner {\n' +
' font-family: sans-serif;\n' +
' color: blue;\n' +
Expand Down Expand Up @@ -509,4 +509,4 @@ describe('e2e tests', function () {
it('precompile respects sourcemaps', async function () {
console.warn('NOT IMPLEMENTED YET')
})
})
})

0 comments on commit faba7c4

Please sign in to comment.