Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Add rollup-plugin-svg #3

Merged
merged 1 commit into from
Oct 10, 2018

Conversation

ryanirilli
Copy link
Contributor

Copy link
Owner

@evocateur evocateur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove packages/pectin-core/package-lock.json and run npm install from the root to update the global lockfile

@ryanirilli
Copy link
Contributor Author

Ah, my bad! fixed

@evocateur
Copy link
Owner

I think rollup-plugin-image might be incompatible with recent versions of Rollup? rollup/rollup-plugin-image#2 is a bit alarming, in any case...

Have you confirmed that this works locally? It'd be really swell if there was a test of this functionality...

@ryanirilli
Copy link
Contributor Author

ryanirilli commented Oct 9, 2018

I updated the PR to use rollup-plugin-svg instead and added an svg import to the integration test to confirm the usage of the loader

@@ -8807,6 +8808,14 @@
}
}
},
"rollup-plugin-svg": {
"version": "1.0.1",
"resolved": "http://znpm.in.zillow.net:31050/r/rollup-plugin-svg/_attachments/rollup-plugin-svg-1.0.1.tgz",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, you need to use --registry https://registry.npmjs.org/ when calling npm install, people on the internet dont' have access to Zillow's private network 😅

'index.js': File('export default function foo() {};'),
'test.svg': File(`test`),
'index.js': File(
`import svgTest from './test.svg'; export default function foo() {};`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to use the svgTest import, otherwise it gets stripped away. Like, return it from foo() or something. The snapshot should be changing, basically.

@evocateur evocateur changed the title add rollup-plugin-image to support image imports feat(core): Add rollup-plugin-svg Oct 10, 2018
@evocateur evocateur merged commit 92ce567 into evocateur:latest Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants