diff --git a/dist/bundle.js b/dist/bundle.js index cd94500..5b1ba6e 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1 +1 @@ -(()=>{var e={852:()=>{console.log("module.js")}},r={};function o(t){if(r[t])return r[t].exports;var n=r[t]={exports:{}};return e[t](n,n.exports,o),n.exports}o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{"use strict";o(852),console.log("index.js")})()})(); \ No newline at end of file +(()=>{"use strict";var e,n,t,r={756:(e,n,t)=>{t.d(n,{Z:()=>i});var r=t(645),o=t.n(r)()((function(e){return e[1]}));o.push([e.id,"#app {\n position: relative;\n}\n\n.content {\n position: absolute;\n top: 0;\n right: 0;\n left: 200px;\n}\n\n.sidebar {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n width: 200px;\n z-index: 100;\n padding: 10px;\n box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);\n overflow-y: auto;\n}\n",""]);const i=o},645:e=>{e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=e(n);return n[2]?"@media ".concat(n[2]," {").concat(t,"}"):t})).join("")},n.i=function(e,t,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i{var r,o=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),i=[];function a(e){for(var n=-1,t=0;t{var n=e&&e.__esModule?()=>e.default:()=>e;return i.d(n,{a:n}),n},i.d=(e,n)=>{for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),e=i(379),n=i.n(e),t=i(756),n()(t.Z,{insert:"head",singleton:!1}),t.Z.locals})(); \ No newline at end of file diff --git a/dist/index.html b/dist/index.html index a31f740..05b4771 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -JavaScript Constructor

Webpack

\ No newline at end of file +JavaScript Constructor

Title

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Incidunt consectetur reprehenderit ex blanditiis assumenda quaerat ea atque fugit eaque asperiores eligendi accusantium ratione exercitationem delectus eveniet unde rerum, possimus voluptate!

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Incidunt consectetur reprehenderit ex blanditiis assumenda quaerat ea atque fugit eaque asperiores eligendi accusantium ratione exercitationem delectus eveniet unde rerum, possimus voluptate!

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Incidunt consectetur reprehenderit ex blanditiis assumenda quaerat ea atque fugit eaque asperiores eligendi accusantium ratione exercitationem delectus eveniet unde rerum, possimus voluptate!

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Incidunt consectetur reprehenderit ex blanditiis assumenda quaerat ea atque fugit eaque asperiores eligendi accusantium ratione exercitationem delectus eveniet unde rerum, possimus voluptate!

\ No newline at end of file diff --git a/package.json b/package.json index 7f91eda..e175298 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,17 @@ "author": "Victor Batischev ", "license": "ISC", "devDependencies": { + "css-loader": "^5.0.0", "html-webpack-plugin": "^4.5.0", + "style-loader": "^2.0.0", "webpack": "^5.3.2", "webpack-cli": "^4.1.0", "webpack-dev-server": "^3.11.0" + }, + "dependencies": { + "bootstrap": "^4.5.3", + "extract-loader": "^5.1.0", + "handlebars": "^4.7.6", + "handlebars-loader": "^1.7.1" } } diff --git a/src/index.html b/src/index.html index e3cf059..b7a3b1e 100644 --- a/src/index.html +++ b/src/index.html @@ -3,9 +3,67 @@ + JavaScript Constructor -

Webpack

+
+ +
+
+
+

Title

+
+
+
+
+

+ Lorem ipsum dolor sit, amet consectetur adipisicing elit. Incidunt + consectetur reprehenderit ex blanditiis assumenda quaerat ea atque + fugit eaque asperiores eligendi accusantium ratione exercitationem + delectus eveniet unde rerum, possimus voluptate! +

+
+
+ +
+
+

+ Lorem ipsum dolor sit, amet consectetur adipisicing elit. + Incidunt consectetur reprehenderit ex blanditiis assumenda + quaerat ea atque fugit eaque asperiores eligendi accusantium + ratione exercitationem delectus eveniet unde rerum, possimus + voluptate! +

+
+
+

+ Lorem ipsum dolor sit, amet consectetur adipisicing elit. + Incidunt consectetur reprehenderit ex blanditiis assumenda + quaerat ea atque fugit eaque asperiores eligendi accusantium + ratione exercitationem delectus eveniet unde rerum, possimus + voluptate! +

+
+
+

+ Lorem ipsum dolor sit, amet consectetur adipisicing elit. + Incidunt consectetur reprehenderit ex blanditiis assumenda + quaerat ea atque fugit eaque asperiores eligendi accusantium + ratione exercitationem delectus eveniet unde rerum, possimus + voluptate! +

+
+
+
+
+ diff --git a/src/index.js b/src/index.js index bf794d5..20396d7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1 @@ -import './module' - -console.log('index.js') - -document.querySelector('h1').style.color = 'red' +import './styles/main.css' diff --git a/src/module.js b/src/module.js deleted file mode 100644 index 5aea41e..0000000 --- a/src/module.js +++ /dev/null @@ -1 +0,0 @@ -console.log('module.js') diff --git a/src/styles/main.css b/src/styles/main.css new file mode 100644 index 0000000..39edf69 --- /dev/null +++ b/src/styles/main.css @@ -0,0 +1,22 @@ +#app { + position: relative; +} + +.content { + position: absolute; + top: 0; + right: 0; + left: 200px; +} + +.sidebar { + position: fixed; + top: 0; + bottom: 0; + left: 0; + width: 200px; + z-index: 100; + padding: 10px; + box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1); + overflow-y: auto; +} diff --git a/webpack.config.js b/webpack.config.js index d5a5a22..f0761c4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,5 +14,18 @@ module.exports = { new HtmlWebpackPlugin({ template: './src/index.html' }) - ] + ], + module: { + rules: [ + { + test: /\.css$/i, + use: [ + 'style-loader', + 'css-loader' + // 'handlebars-loader', // handlebars loader expects raw resource string + // 'extract-loader' + ] + } + ] + } }