Git Product home page Git Product logo

sbt-webpack's People

Contributors

benmccann avatar kwseok avatar mgilbertnz avatar nightkr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sbt-webpack's Issues

How to use with Play's `run` task

I'm trying to use sbt-webpack in a play 2.5 project. How can I hook sbt-webpack into Play's run task, which starts a dev server? And/or how can I make it run after assets task?

Caching is broken on Windows

When discovering contexts from Webpack the path isn't recognized as absolute on Windows, meaning that it tries to discover files in (for example) C:\Users\User\appman\C:\Users\User\appman\app\assets rather than C:\Users\User\appman\app\assets.

A patch is WIP.

Setup continuous build

It'd be nice to have a test suite run automatically to validate pull requests. Travis is free for open source projects and pretty easy to setup. Most of the Lightbend plugins use it, so there's lots of examples as well

The TypeScript Sources are copied to Target

The plugin works, but there are several caveats:

  1. The .ts sources are copied to target/web/public/main
  2. The suggested config with output.path set to /target/web/webpack makes the file not to be found by routes <script src="@routes.Assets.versioned("webpack/bundle.js")" type="text/javascript"></script>. (workaround: set the path to path.join(__dirname, '/target/web/public/main/javascripts') and use <script src="@routes.Assets.versioned("javascripts/bundle.js")" type="text/javascript"></script>)
  3. Now we need to run separated webpack:startWatch command. How can we cause the plugin to run when we build the project?

Compile JSX code to Javascript, and bundle them together

Dear friends, first of all, thanks for your wonderful work!!
I need the SBT-Webpack Plugin for:

  • Compile JSX code to Javascript as defined in webpack.config.js

  • Bundle the Javascipt code together

  • And execute some scripts(Webpack commands) as defined in package.json

Is this posible with SBT-Webpack Plugin?
Thanks in advance!!

sbt reload fails

Hi there,

Thanks for writing this plugin, it's saved me heaps of time. I think I may have found an issue with the watch feature.

The issue occurs when I try to reload an sbt play project with this plugin added. I don't have any sbt-webpack specific settings in my build.sbt. I tested and this issue also occurs with sbt-play-webpack.

src$ sbt
[server-play] $ reload
java.util.NoSuchElementException: None.get
        at scala.None$.get(Option.scala:313)
        at scala.None$.get(Option.scala:311)
        at com.github.stonexx.sbt.webpack.SbtWebpack$autoImport$.stateToWebpackWatcherRunner(SbtWebpack.scala:60)

full-stack-trace.txt

Cheers,

Matt

How to make the webpack to run on file change

Hello and thank you for the plugin.

I am trying to make the webpack run after I modify a .ts file(s), but it does not.

I have in my webpack.config.js:

module: {
		loaders: [
			{
				test: /\.ts$/,
				loader: 'awesome-typescript-loader'
			},
			{
				test: /\.css$/,
				loader: "style-loader!css-loader"
			}
		]
	},

and in build.sbt:

includeFilter in (Assets, webpack) := "*.ts"

also tried:

includeFilter in webpack := "*.ts"

and:

includeFilter in webpack := "*.ts" || "*.css"

nothing triggers the recompile.

Also I am not sure how, but the webpack is resolving the files from <project_folder>/src, and I am not sure why src is there. (I have Play project, where my assets are under app).

This issue makes me have:

entry: '../app/assets/src/app',

instead of:

entry: './app/assets/src/app',

When I run node's webpack from command line - it resolves the files ok.

Help with example

I'm trying to add examples of Play using webpack in official Lightbend docs and examples. I have a branch converting one of the templates here:

https://github.com/benmccann/activator-lagom-java-chirper/tree/webpack

For some reason the webpack task is never being called when I use WebKeys.pipeline := WebKeys.pipeline.dependsOn(webpack.toTask("")).value

Why is that syntax used rather than the recommended pipelineStages := Seq(myPipelineTask)?

If I change it to compile in Compile <<= (compile in Compile).dependsOn(webpack.toTask("")) then it works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.