thasmo / external-svg-polyfill Goto Github PK
View Code? Open in Web Editor NEWSmall and basic polyfill to support referencing external SVG files.
License: MIT License
Small and basic polyfill to support referencing external SVG files.
License: MIT License
Consider triggering events for certain actions.
The element cache can't handle multiple SVG use elements with the same URL at the moment. This becomes a problem when running destroy
, which does not restore all elements.
Seems to be used by webpack but doesn't export any modules, which kinda breaks builds and is not the intended outcome.
After upgrading from Webpack Encore 0.33 to 1.7.0 I have the following error:
> encore production
Running webpack ...
WARN Compiled with 1 warnings7:47:55 AM
warn in ./packages/theme/Resources/Private/Js/main.js7:47:55 AM
export 'default' (imported as 'ExternalSvgPolyfill') was not found in '@thasmo/external-svg-polyfill' (module has no exports)
ERROR Failed to compile with 1 errors7:47:55 AM
Module build failed: Module not found:
"./node_modules/@thasmo/external-svg-polyfill/module/index.js" contains a reference to the file "./core/Polyfill".
This file can not be found, please check it for typos or update it if the file got moved.
Entrypoint main = runtime.f831b087.js 189.1818b934.js 800.6b815a86.js main.7c7f9bd6.css main.bb64df66.js 73 auxiliary assets
webpack compiled with 1 error and 1 warning
The main difference is, that Webpack Encore 1.x uses Webpack 5 instead of Webpack 4.
When I change the import from
export { default } from './core/Polyfill';
to
export { default } from './core/Polyfill.js';
it works fine.
Also: when I remove "type": "module",
from your npm-package's package.json - it compiles fine too.
I know that in Webpack 5 something changed about Node modules loading. But I thought that referes only to old "require" statements and default Node.js modules like "path" and so on.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.