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

STENCIL-3243 run the theme bundling script (webpack) in a different process #286

Merged
merged 4 commits into from
Mar 20, 2017

Conversation

mcampa
Copy link
Contributor

@mcampa mcampa commented Mar 15, 2017

STENCIL-3243

Run the theme bundling script (webpack) in a different process (fork)

Webpack was run from the cli using a require() call to a file in the theme directory. This makes webpack to use dependencies from stencil-cli instead of only using dependencies from the theme itself

This requires a change in Cornerstone stencil.conf.js format, but is written to be backwards compatible.

Instead of requireing the file directly from stencil-cli, we are now using child_process.fork() and communicating with the process over an IPC communication channel

@bigcommerce/stencil-team

@mcampa
Copy link
Contributor Author

mcampa commented Mar 15, 2017

@lord2800

@dstaley
Copy link
Contributor

dstaley commented Mar 15, 2017

If this prevents Webpack from picking up JSPM's polyfill of System.import, I'm going to be incredibly happy. I think that's the only caveat I ran into when migrating to Webpack 2.

@mcampa
Copy link
Contributor Author

mcampa commented Mar 15, 2017

That is exactly what is doing @dstaley. We read your article, and we are in the process of upgrading Cornerstone to use Webpack2. So we thank you.

@@ -34,6 +34,7 @@
"accept-language-parser": "^1.0.2",
"archiver": "^0.14.4",
"async": "^1.3.0",
"babel-eslint": "^7.1.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you! this gets the build working now, with the babel-eslint parser

}
});

// process.send('ready');
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for the comment

@mjschock
Copy link
Contributor

LGTM; 👍 and i confirm that it works with the webpack 2 changes to Cornerstone

@mcampa mcampa merged commit 00766f3 into bigcommerce:master Mar 20, 2017
@mcampa mcampa deleted the STENCIL-3243-stencil-builder branch March 20, 2017 19:50
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.

3 participants