Closed zetlen closed 4 years ago
Hi @zetlen. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
Created PWA-866
@magento I am working on this
@zetlen runPhase
already know about what are is active PWA Studio extensions.
Addressed by #2765, going to close this out.
Any extension with a React component, or any file that will go into the bundle, has to do this in its intercept: file
This is tedious, because most extensions WILL contain those types of modules. These flags should be set by default for every module.
The
specialFeatures
target is meant for extensions to flag that they contain certain file types which will be included into the build. Without explicitly including extensions into Webpack rule patterns, they wouldn't be parsed as ES Modules or CSS modules, because Webpack doesn't do that for all node_modules by default. If we made it do that, we'd have extremely slow builds, so we do need to explicitly include extensions.But we can make the Webpack JS and CSS loaders include all code inside registered extensions and assume it's CSS and JS modules. Then, a lot of that boilerplate can go away.
Possible solutions Implementation notes
This isn't completely trivial because we still need to keep those rules false "by default", for all the hundreds of Node modules. To have them on "by default" you would need to refactor a bit.
BuildBus should have an accessor for the list of all active extensions; it can gather that from its call to
pertain
.In
getModuleRules()
, thehasFlag(foo)
method should return all active extension directories by default, only removing one if it has explicitly tappedspecialFeatures
to setfeatures[targets.name] = { foo: false }
The UpwardIncludePlugin should no longer error if an
upward.yml
isn't found, it should just move onPlease let us know what packages this bug is in regards to:
venia-concept
venia-ui
pwa-buildpack
peregrine
pwa-devdocs
upward-js
upward-spec
create-pwa