-
-
Save anonymous/67ebc824e609de5e904fac126f2021dd to your computer and use it in GitHub Desktop.
This file contains 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
//var webpack = require("webpack"); | |
var $ = require("jquery"); | |
function exportHtml(){ | |
$(document).ready(function(){ | |
var css = document.createElement("link"); | |
css.type = "text/css"; | |
css.rel = "stylesheet"; | |
css.href = "./node_modules/bootstrap/dist/css/bootstrap.min.css"; | |
$("head").append(css); | |
var css2 = document.createElement("link"); | |
css2.type = "text/css"; | |
css2.rel = "stylesheet"; | |
css2.href = "./src/css/style.css"; | |
$("head").append(css2); | |
$("body").load("./src/mainContainer.html", function(){ | |
$(".main_container .row").append("<strong>Success</strong>"); | |
}); | |
}); | |
} | |
module.exports = exportHtml(); |
This file contains 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
// Same as app.js -- The “entry point” is where your application will start, and where webpack will start tracking dependencies between modules. // | |
//require("!style!css!../css/style.css"); | |
//require("!style!css!bootstrap/dist/css/bootstrap.min.css"); | |
document.write(require("./content.js")); |
This file contains 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
<div class="main_container container-fluid" id="main"> | |
<div class="row"> | |
</div> | |
</div> |
This file contains 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
var webpack = require("webpack"); | |
module.exports = { | |
entry: [ | |
"./src/js/entry.js" | |
], | |
output: { | |
filename: 'app.bundle.js', | |
path: "./build" | |
}, | |
module: { | |
loaders : [ | |
// { test: /\.css$/, loader: ["style-loader","css-loader"]}, | |
{ test: /\.(woff2?|svg|jpe?g|png|gif|ico)$/, loader: 'url?limit=10000' }, | |
{ test: /\.(ttf|eot)$/, loader: 'file' } | |
// { test: /!bootstrap.+\.(jsx|js)$/, loader: 'imports?jQuery=jquery,$=jquery,this=>window' } | |
] | |
} | |
/* plugins: [ | |
new webpack.ProvidePlugin({ | |
... | |
}) | |
] | |
*/ | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment