Last active
October 23, 2017 04:01
-
-
Save zouhir/d23fae39aaa512ad2c1c007d65a2535c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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