Hi,
I am using EmberJS to create a PWA application and it requires that only 1 app.js and 1 app.css files are generated. I have tried twiking Ember Auto Import and Webpack but it seems that there is a built-in functionality to produce chunk.app..js and chunk.test..js files.
I have ended up using this ember-cli-build.s setting:
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
]
that forces Webpack to produce only 1 chunk file. I also added an NPM script that manually appends the chunk.app.*.js file to vendor.js. It seems too hacky though.
I would like to ask if there is a way to “force” Webpack or Ember to just produce one JS file, even though it may not the best optimized way.
PS. I have also tried this Ember Auto Import’s feature but it doesn’t seem to work properly on dev builds.
<!-- in index.html -->
<body>
{{content-for "body"}}
<script src="{{rootURL}}assets/vendor.js"></script>
+ <auto-import-script entrypoint="app"></auto-import-script>
<script src="{{rootURL}}assets/your-app.js"></script>
{{content-for "body-footer"}}
</body>
Thanks.