Module: Webpacker

Extended by:
Webpacker
Included in:
Webpacker
Defined in:
lib/webpacker.rb,
lib/webpacker/runner.rb,
lib/webpacker/version.rb,
lib/webpacker/webpack_runner.rb,
lib/webpacker/dev_server_runner.rb

Defined Under Namespace

Modules: Helper Classes: Commands, Compiler, Configuration, DevServer, DevServerProxy, DevServerRunner, Engine, Env, Instance, Manifest, Runner, WebpackRunner

Constant Summary collapse

VERSION =

Change the version in package.json too, please!

"4.0.0.pre.3".freeze

Instance Method Summary collapse

Instance Method Details

#instanceObject


13
14
15
# File 'lib/webpacker.rb', line 13

def instance
  @instance ||= Webpacker::Instance.new
end

#instance=(instance) ⇒ Object


9
10
11
# File 'lib/webpacker.rb', line 9

def instance=(instance)
  @instance = instance
end

#with_node_env(env) ⇒ Object


17
18
19
20
21
22
23
# File 'lib/webpacker.rb', line 17

def with_node_env(env)
  original = ENV["NODE_ENV"]
  ENV["NODE_ENV"] = env
  yield
ensure
  ENV["NODE_ENV"] = original
end