Octal literals and escape sequences are not allowed in template strings (only in development) #766
Closed
1 of 5 tasks
Labels
Milestone
Type of Change
Summary
So in trying to migrate my studio website from Angular + Bootstrap v4 => Lit + Bootstrap v4, ran into this issue regarding the source code of bootstrap and font-awesome.
Basically they each have code like this
These are octal expressions / literals, and are deprecated and are not allowed in ES6+ / ESM (strict mode), which means when using ESM to
![Screen Shot 2021-10-11 at 5 45 54 PM](https://user-images.githubusercontent.com/895923/136994074-7b538b2f-1523-450e-83bf-3199a07e0ebf.png)
![Screen Shot 2021-10-11 at 1 25 00 PM](https://user-images.githubusercontent.com/895923/136994490-d420e76f-f52f-4e3d-bc5a-eaa7e90a6393.png)
import
CSS (like with plugin-import-css, the browser throws an exception and stops rendering everything.Details
Curiously, this does not seem to happen when running a production build, and I was able to get everything to style correctly?
![Screen Shot 2021-10-12 at 11 36 04 AM](https://user-images.githubusercontent.com/895923/136994723-8aaf4905-e8d3-4611-81a1-8c11b4507c9e.png)
So based on the error which implies es-module-shims is throwing the exception, maybe this is something that can be circumvented? I tried just using the escaping suggestions from the MDN docs in our plugin and that made the error go away BUT then the icons didn't show correctly.
![Screen Shot 2021-10-11 at 1 27 35 PM](https://user-images.githubusercontent.com/895923/136994418-6407bfe4-e274-4e62-9025-8ecc0d71c4ba.png)
I also tried not using template literals to wrap the converted CSS but that still left the browser saying this cant be used in strict mode. 🤷♂️ 😑
![Screen Shot 2021-10-11 at 5 45 54 PM](https://user-images.githubusercontent.com/895923/136995401-bb3363d0-6cc7-41b5-a64b-9d49ba570893.png)
Additional references / resources
The text was updated successfully, but these errors were encountered: