Skip to content

Instantly share code, notes, and snippets.

@zouhir
Last active October 23, 2017 04:01
Show Gist options
  • Save zouhir/d23fae39aaa512ad2c1c007d65a2535c to your computer and use it in GitHub Desktop.
Save zouhir/d23fae39aaa512ad2c1c007d65a2535c to your computer and use it in GitHub Desktop.
// add this please
// add this please
require("preact-cli/lib/lib/webpack/polyfills");
// look above
import { h } from "preact";
import habitat from "preact-habitat";
import Widget from "./components/hello-world";
let _habitat = habitat(Widget);
_habitat.render({
selector: '[data-widget-host="habitat"]',
clean: true
});
import path from "path";
export default (config, env, helpers) => {
// delete config.entry.polyfills;
let { plugin } = helpers.getPluginsByName(config, "ExtractTextPlugin")[0];
plugin.options.disable = true;
if (env.production) {
config.output.libraryTarget = "umd";
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment