diff --git a/lib/generators/react_on_rails/templates/base/base/config/webpack/paths.yml b/lib/generators/react_on_rails/templates/base/base/config/webpack/paths.yml index 007cc8d6e..e4449cb1e 100644 --- a/lib/generators/react_on_rails/templates/base/base/config/webpack/paths.yml +++ b/lib/generators/react_on_rails/templates/base/base/config/webpack/paths.yml @@ -1,9 +1,8 @@ +# Used by webpacker_lite to configure the helpers and by webpack from the +# client/webpack.config.js file, in variable `paths`. default: &default output: public - assets: webpack manifest: manifest.json - node_modules: client/node_modules - source: client/app development: <<: *default diff --git a/spec/dummy/client/package.json b/spec/dummy/client/package.json index c7a49e9c0..a81577ca6 100644 --- a/spec/dummy/client/package.json +++ b/spec/dummy/client/package.json @@ -68,13 +68,13 @@ "scripts": { "lint": "eslint --ext .js,.jsx .", "test": "yarn run build:test && rspec", - "build:test": "NODE_ENV=test yarn run build:client && NODE_ENV=test yarn run build:server", - "build:production:client": "NODE_ENV=production webpack --config webpack.client.rails.build.config.js", - "build:production:server": "NODE_ENV=production webpack --config webpack.server.rails.build.config.js", - "build:client": "webpack --config webpack.client.rails.build.config.js", + "build:test": "yarn run build:test:client && yarn run build:test:server", + "build:test:client": "NODE_ENV=test webpack --config webpack.client.rails.build.config.js", + "build:test:server": "NODE_ENV=test webpack --config webpack.server.rails.build.config.js", "build:dev:client": "NODE_ENV=development webpack -w --config webpack.client.rails.build.config.js", "build:dev:server": "NODE_ENV=development webpack -w --config webpack.server.rails.build.config.js", - "build:server": "webpack --config webpack.server.rails.build.config.js", + "build:production:client": "NODE_ENV=production webpack --config webpack.client.rails.build.config.js", + "build:production:server": "NODE_ENV=production webpack --config webpack.server.rails.build.config.js", "hot-assets": "NODE_ENV=development babel-node server-rails-hot.js", "install-react-on-rails": "rm -rf node_modules/react-on-rails && npm i 'file:../../..'" }, diff --git a/spec/dummy/config/webpack/paths.yml b/spec/dummy/config/webpack/paths.yml index b4ebf32f6..5fa65f9a5 100644 --- a/spec/dummy/config/webpack/paths.yml +++ b/spec/dummy/config/webpack/paths.yml @@ -1,9 +1,8 @@ +# Used by webpacker_lite to configure the helpers and by webpack from the +# client/webpack.client.base.config.js and other sibling config files, using variable `paths`. default: &default - config: client/webpack output: public - assets: webpack manifest: manifest.json - source: client/app development: <<: *default