Replies: 1 comment
-
Thanks no need anymore. I made just a simple perl script to combine and minimise the source files. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, i just started to check webpack.
<script src="./dist/bundle.js"></script> <script type="module">My current app are using a lot script files which have
const , objects, classes or just functions
if i try to use webpack i can not get it running.
even this simple sample i can not solve.
I get always in Edge the error: SyntaxError: The requested module './dist/bundle.js' does not provide an export named 'default' (at index.html:10:8)
May someone can help. Thanks
`
import printHello from './dist/bundle.js';
printHello();
</script>`
const What="Ni Hao"; export default function printHello() { document.write('<h1>Hello World2</h1>'); };
module.exports = {
optimization: {
minimize: false
},
entry: './main.js',
output: {
filename: 'bundle.js',
}
bundle.js =
};
// (() => { // webpackBootstrap
// "use strict";
// // The require scope
// var webpack_require = {};
//
//
// / webpack/runtime/define property getters /
// (() => {
// // define getter functions for harmony exports
// webpack_require.d = (exports, definition) => {
// for(var key in definition) {
// if(webpack_require.o(definition, key) && !webpack_require.o(exports, key)) {
// Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
// }
// }
// };
// })();
//
// /* webpack/runtime/hasOwnProperty shorthand /
// (() => {
// webpack_require.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
// })();
//
/*****************************************************************/
var webpack_exports = {};
/ unused harmony export default /
const What="Ni Hao";
function printHello()
{
document.write('
Hello World2
');};
// })()
;`
Beta Was this translation helpful? Give feedback.
All reactions