-
Notifications
You must be signed in to change notification settings - Fork 137
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
How to generate an assetMap in apps? #993
Comments
To see what webpack thinks it's done after compilation, this plugin can be addded: class DebugPlugin {
apply(compiler) {
compiler.hooks.done.tap('my-plugin-name', (stats) => {
console.log(stats);
// debugger
});
}
}
// ...
plugins: [
new DebugPlugin(),
] helpful resources: Also JOBS=1 NODE_OPTIONS="--inspect-brk" ember build --environment=production with |
Looks like I've been looking in the wrong place the whole time -- styles are minified / hashed / written outside of the webpack process here: https://github.com/embroider-build/embroider/blob/master/packages/webpack/src/ember-webpack.ts#L103 So, it looks like I may need to add manifest writing to embroider itself. Probably good to do anyway? 🤷 |
Only "legacy" styles. Webpack itself also handles styles that get imported into the module graph. |
What are modern styles? Should I get rid of my app.css?
|
pre embroider, we'd generate an asset map via:
but under embroider this option has no effect.
I've been exploring some options, and will record my progress here.
One option I'd really love to have is to shove the assetConfig in the index.html so I don't have to load it.
It seems that only assets-webpack-plugin provides that capability, as described in the README, but I've been unable to get it to work.
So, in the mean time, since in my particular app, I don't need the asset map on load, I've included this HTML for when I do want to test out using the manifest.
of note, the plugins all output JSON, but they all provide transform options for converting to JS, For example:
but, because I haven't gotten anything behaving the way I want yet, I'm going to leave things as JSON for brevity.
things to figure out:
for reference, the files in dist
webpack-manifest-plugin
config
output
assets-webpack-plugin
config
output
webpack-assets-manifest
config
output
Something interesting about this plugin, is that with a couple extra options,
we get this output
The text was updated successfully, but these errors were encountered: