Skip to content

Conversation

@petehunt
Copy link
Contributor

I moved everything to commonjs because I understand it better, but you could use es6-loader instead. Note that this takes care of optimizing your app into multiple bundles so you don't have to worry about it. Tried to change as little as possible.

@mjackson
Copy link
Member

My vote would be to continue to use ES6 modules. If you need CommonJS for some reason, the dist process already takes care of that for you.

Also, the es6! prefix that webpack uses for everything leaves a bad taste.

@petehunt Can you use the existing setup to compile down to CommonJS and then use bundles?

@petehunt
Copy link
Contributor Author

This will work transparenly with es6 modules I think, I just was in experiment mode and wanted to use commonjs which I'm more familiar with. You can set up webpack to use the loader automatically so no prefix is required.

@ryanflorence
Copy link
Member

This is great! Still checking it out, but:

broccoli build dist

dist/cjs/all-the-things-you-wanted-are-here-already.js

:)

@ryanflorence
Copy link
Member

@petehunt I converted the lib over to cjs + webpack (master got way ahead of this, was simpler to just convert it all again), but I can't get the partial loading example to work anymore. Care to make it work with latest master?

Just rename examples/_partial-app-loading to examples/partial-app-loading and then the webpack config will pick it up again.

Currently its adding all the async components into the build (?) and also creating a bizarre .7/ directory (likely because of buildConfig in webpack.config.js)

@ryanflorence
Copy link
Member

closed in favor of 9f43019

timdorr pushed a commit that referenced this pull request Dec 14, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
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.

3 participants