1.1.18 • Published 9 years ago

leitjohn-webpack-starter v1.1.18

Weekly downloads
-
License
ISC
Repository
-
Last release
9 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

9 years ago

1.1.17

9 years ago

1.1.16

9 years ago

1.1.15

9 years ago

1.1.14

9 years ago

1.1.13

9 years ago

1.1.12

9 years ago

1.1.11

9 years ago

1.1.10

9 years ago

1.1.9

9 years ago

1.1.8

10 years ago

1.1.7

10 years ago

1.1.6

10 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.0.6

10 years ago