Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Implement pure annotation for createPlugin #287

Merged
merged 4 commits into from
Mar 20, 2018

Conversation

KevinGrandon
Copy link
Contributor

@KevinGrandon KevinGrandon commented Mar 20, 2018

  • Cherry-pick be9b2bf in and update tests for babel7 transpilation changes.
  • Adds a tree-shaking integration test in addition to babel plugin.

Fixes #287

@KevinGrandon KevinGrandon force-pushed the webpack4-tree-shaking branch from 4c8588c to 14370d1 Compare March 20, 2018 21:37
@KevinGrandon KevinGrandon force-pushed the webpack4-tree-shaking branch from 14370d1 to 354af08 Compare March 20, 2018 21:43
@KevinGrandon KevinGrandon changed the title WIP - Add webpack 4 tree shaking test Implement pure annotation for createPlugin Mar 20, 2018
export default async function() {
const app = new App('element', el => el);
__BROWSER__ && app.register(defaultExportBrowserPlugin);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be really useful to test named exports also.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, test added.

@@ -0,0 +1,8 @@
import {createPlugin} from 'fusion-core';

const PLUGIN = /*@__PURE__*/ createPlugin({
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of the instrumented as pure files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just thought it would be good to have a test case for this, in case that folks want to instrument their own code.

ganemone
ganemone previously approved these changes Mar 20, 2018
@KevinGrandon KevinGrandon merged commit 77fb9dc into fusionjs:master Mar 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants