POI.js v10 - Building UMD Modules #496
Comments
Can you try Poi 12 instead 😂 now html is only disabled for commonjs format, source map is always disabled in production mode |
poi.js.org should be the docs for v12 🤔 |
Hello @egoist Having SourceMap disabled for Production build is perfectly fine, as long as developers can get them in dev mode. I'll try POI v12 now and let you know about it. Do you have any idea when v12 will be officially out ? |
@vvanmol Poi v12 is pretty stable right now, official release will come out next month hopefully. |
@egoist I'm busy with the migration from v10 to v12 and I have a couple of questions:
Thanks !! |
I'll propably add a new option call // poi.config.js
output: {
pages: {
foo: {
entry: './foo.js',
// ...extra options for html-webpack-plugin
},
bar: {
entry: './bar.js'
}
}
} With above config Poi will generate If you want to generate multiple HTML files now, use html-webpack-plugin directly: // poi.config.js
const html = []
module.exports = {
chainWebpack(config) {
html.forEach((v, i) => {
config.plugin(`my-html-${i}`)
.use(require('html-webpack-plugin'), [v])
})
}
}
This option seems unnecessary, you can put files in
Use
It's still webpack-dev-server but |
I used to output my bundle in a "build" folder where I would also
Extra questions:
|
Released a new version: https://github.com/egoist/poi/releases/tag/poi%4012.0.0-beta.7 |
This issue has been marked as Stale, it will be closed in a week if there's no furthur activity. |
Hello,
I'm busy migrating my application from POI v9 to POI v10. I did create a default poi.config.js that could bundle SPA's into UMD module with Source Maps and HTML Templates.
After updating the POI library and all used Presets (or Plugins) I see that my UMD Bundle now comes without Source Maps and without HTML Templates...
After checking out on the Internet in order to understand what was going on I finally found in the docs of the poi.js.org Github Repository that:
This text comes from the docs/options.md file, in the description of the "library" option.
I wanted to understand why SourceMaps and HTML Templates are automatically disabled without the possibility to configure them when "format" is set to "umd". In the company I work for we can't bundle our SPA's as IIFE as these Bundles are loaded in a Portal using Require.js and they require some configuration when being instantiated...
So indeed the HTML Templates I used to generate are not actually part of the delivery, but at least developers were able to use these templates locally when developing their SPA.
Could you explain the reasoning that lead to remove the possibility to generate HTML files and SourceMaps for UMD Modules ? Because this is a feature I still need and this may force us to switch back to Webpack... :-(
The text was updated successfully, but these errors were encountered: