1.1.18 • Published 7 years ago

leitjohn-webpack-starter v1.1.18

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

Use this to get up and running with webpack

You just need to create a snippet like this in a file called webpack.config.js

configure = require("leitjohn-webpack-starter").configure;

config = configure({
    src: "source/",
    dest: "../../[django-app]/static/"
});

module.exports = config;

Here are the configuration defaults:

src: "src/" # source files dest: "lib/" # compiled file destination maps: "maps/" # source maps destination www: "www/" # for webpack-dev-server files root styles: "styles/" # if you have styles you'd like to pack too test: "test/" # if you have tests to run templates: "templates/" # if you have nunjucks templates

Bonus! here is an html template for you to drop in www/

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>sample</title>
    <link href="bundle.css" rel="stylesheet">
  </head>

  <body>
    <div id="app" class="container">
      loading...
    </div><!-- /.container -->

    <script src="bundle.js"></script>
    <script>
      window.app = new Main({apiRoot: "http://192.168.10.112:8005/api"});
      app.render()
    </script>
  </body>
</html>
1.1.18

7 years ago

1.1.17

7 years ago

1.1.16

7 years ago

1.1.15

7 years ago

1.1.14

7 years ago

1.1.13

7 years ago

1.1.12

7 years ago

1.1.11

7 years ago

1.1.10

7 years ago

1.1.9

8 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.0.6

8 years ago