webpacker 5.2.1 → 6.0.0.beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +1 -1
  3. data/.gitignore +2 -0
  4. data/.node-version +1 -1
  5. data/.rubocop.yml +11 -16
  6. data/6_0_upgrade.md +43 -0
  7. data/CHANGELOG.md +25 -0
  8. data/CONTRIBUTING.md +1 -1
  9. data/Gemfile.lock +17 -11
  10. data/README.md +220 -99
  11. data/lib/install/config/webpack/base.js +3 -0
  12. data/lib/install/config/webpack/development.js +2 -2
  13. data/lib/install/config/webpack/production.js +2 -2
  14. data/lib/install/config/webpack/test.js +2 -2
  15. data/lib/install/config/webpacker.yml +8 -37
  16. data/lib/install/javascript/packs/application.css +9 -0
  17. data/lib/install/javascript/packs/application.js +3 -1
  18. data/lib/install/template.rb +33 -19
  19. data/lib/tasks/webpacker.rake +2 -11
  20. data/lib/tasks/webpacker/binstubs.rake +6 -4
  21. data/lib/tasks/webpacker/check_binstubs.rake +4 -4
  22. data/lib/tasks/webpacker/check_yarn.rake +1 -2
  23. data/lib/tasks/webpacker/compile.rake +4 -2
  24. data/lib/tasks/webpacker/info.rake +12 -10
  25. data/lib/tasks/webpacker/install.rake +6 -4
  26. data/lib/tasks/webpacker/verify_install.rake +2 -1
  27. data/lib/tasks/webpacker/yarn_install.rake +9 -1
  28. data/lib/webpacker/commands.rb +1 -1
  29. data/lib/webpacker/compiler.rb +15 -8
  30. data/lib/webpacker/configuration.rb +6 -30
  31. data/lib/webpacker/dev_server_runner.rb +21 -2
  32. data/lib/webpacker/helper.rb +22 -32
  33. data/lib/webpacker/manifest.rb +1 -1
  34. data/lib/webpacker/version.rb +1 -1
  35. data/lib/webpacker/webpack_runner.rb +5 -0
  36. data/package.json +23 -39
  37. data/package/__tests__/config.js +5 -37
  38. data/package/__tests__/development.js +9 -11
  39. data/package/__tests__/env.js +12 -4
  40. data/package/__tests__/production.js +6 -6
  41. data/package/__tests__/staging.js +7 -6
  42. data/package/__tests__/test.js +4 -5
  43. data/package/babel/preset.js +55 -0
  44. data/package/config.js +3 -11
  45. data/package/env.js +8 -2
  46. data/package/environments/__tests__/base.js +15 -47
  47. data/package/environments/base.js +62 -125
  48. data/package/environments/development.js +45 -44
  49. data/package/environments/production.js +63 -68
  50. data/package/environments/test.js +2 -2
  51. data/package/index.js +13 -8
  52. data/package/rules/babel.js +9 -7
  53. data/package/rules/coffee.js +6 -0
  54. data/package/rules/erb.js +15 -0
  55. data/package/rules/file.js +19 -19
  56. data/package/rules/index.js +15 -18
  57. data/package/rules/less.js +22 -0
  58. data/package/rules/sass.js +12 -9
  59. data/package/rules/svg.js +20 -0
  60. data/package/utils/get_style_rule.js +26 -36
  61. data/package/utils/helpers.js +26 -35
  62. data/test/compiler_test.rb +0 -12
  63. data/test/configuration_test.rb +1 -32
  64. data/test/dev_server_runner_test.rb +24 -5
  65. data/test/engine_rake_tasks_test.rb +39 -0
  66. data/test/helper_test.rb +15 -9
  67. data/test/mounted_app/Rakefile +4 -0
  68. data/test/mounted_app/test/dummy/Rakefile +3 -0
  69. data/test/mounted_app/test/dummy/bin/rails +3 -0
  70. data/test/mounted_app/test/dummy/bin/rake +3 -0
  71. data/test/mounted_app/test/dummy/config.ru +5 -0
  72. data/test/mounted_app/test/dummy/config/application.rb +10 -0
  73. data/test/mounted_app/test/dummy/config/environment.rb +3 -0
  74. data/test/mounted_app/test/dummy/config/webpacker.yml +75 -0
  75. data/test/mounted_app/test/dummy/package.json +7 -0
  76. data/test/rake_tasks_test.rb +1 -10
  77. data/test/test_app/config/webpacker.yml +1 -25
  78. data/test/test_app/config/webpacker_public_root.yml +0 -1
  79. data/test/test_app/public/packs/manifest.json +17 -13
  80. data/test/test_app/some.config.js +0 -0
  81. data/test/webpack_runner_test.rb +9 -3
  82. data/webpacker.gemspec +1 -1
  83. data/yarn.lock +1858 -4915
  84. metadata +44 -90
  85. data/.travis.yml +0 -43
  86. data/docs/assets.md +0 -119
  87. data/docs/cloud9.md +0 -310
  88. data/docs/css.md +0 -308
  89. data/docs/deployment.md +0 -130
  90. data/docs/docker.md +0 -68
  91. data/docs/engines.md +0 -213
  92. data/docs/env.md +0 -63
  93. data/docs/es6.md +0 -72
  94. data/docs/folder-structure.md +0 -66
  95. data/docs/integrations.md +0 -220
  96. data/docs/misc.md +0 -23
  97. data/docs/props.md +0 -223
  98. data/docs/target.md +0 -22
  99. data/docs/testing.md +0 -136
  100. data/docs/troubleshooting.md +0 -158
  101. data/docs/typescript.md +0 -190
  102. data/docs/v4-upgrade.md +0 -142
  103. data/docs/webpack-dev-server.md +0 -92
  104. data/docs/webpack.md +0 -364
  105. data/docs/yarn.md +0 -23
  106. data/lib/install/angular.rb +0 -23
  107. data/lib/install/coffee.rb +0 -25
  108. data/lib/install/config/.browserslistrc +0 -1
  109. data/lib/install/config/babel.config.js +0 -70
  110. data/lib/install/config/postcss.config.js +0 -12
  111. data/lib/install/config/webpack/environment.js +0 -3
  112. data/lib/install/elm.rb +0 -39
  113. data/lib/install/erb.rb +0 -25
  114. data/lib/install/examples/angular/hello_angular.js +0 -7
  115. data/lib/install/examples/angular/hello_angular/app/app.component.ts +0 -9
  116. data/lib/install/examples/angular/hello_angular/app/app.module.ts +0 -16
  117. data/lib/install/examples/angular/hello_angular/index.ts +0 -8
  118. data/lib/install/examples/angular/hello_angular/polyfills.ts +0 -73
  119. data/lib/install/examples/coffee/hello_coffee.coffee +0 -4
  120. data/lib/install/examples/elm/Main.elm +0 -55
  121. data/lib/install/examples/elm/hello_elm.js +0 -16
  122. data/lib/install/examples/erb/hello_erb.js.erb +0 -6
  123. data/lib/install/examples/react/babel.config.js +0 -87
  124. data/lib/install/examples/react/hello_react.jsx +0 -26
  125. data/lib/install/examples/react/tsconfig.json +0 -21
  126. data/lib/install/examples/stimulus/application.js +0 -1
  127. data/lib/install/examples/stimulus/controllers/hello_controller.js +0 -18
  128. data/lib/install/examples/stimulus/controllers/index.js +0 -9
  129. data/lib/install/examples/svelte/app.svelte +0 -11
  130. data/lib/install/examples/svelte/hello_svelte.js +0 -20
  131. data/lib/install/examples/typescript/hello_typescript.ts +0 -4
  132. data/lib/install/examples/typescript/tsconfig.json +0 -24
  133. data/lib/install/examples/vue/app.vue +0 -22
  134. data/lib/install/examples/vue/hello_vue.js +0 -72
  135. data/lib/install/loaders/coffee.js +0 -6
  136. data/lib/install/loaders/elm.js +0 -25
  137. data/lib/install/loaders/erb.js +0 -11
  138. data/lib/install/loaders/svelte.js +0 -9
  139. data/lib/install/loaders/vue.js +0 -6
  140. data/lib/install/react.rb +0 -18
  141. data/lib/install/stimulus.rb +0 -12
  142. data/lib/install/svelte.rb +0 -29
  143. data/lib/install/typescript.rb +0 -39
  144. data/lib/install/vue.rb +0 -49
  145. data/lib/tasks/installers.rake +0 -42
  146. data/package/config_types/__tests__/config_list.js +0 -118
  147. data/package/config_types/__tests__/config_object.js +0 -43
  148. data/package/config_types/config_list.js +0 -75
  149. data/package/config_types/config_object.js +0 -55
  150. data/package/config_types/index.js +0 -7
  151. data/package/rules/module.css.js +0 -3
  152. data/package/rules/module.sass.js +0 -8
  153. data/package/rules/node_modules.js +0 -22
  154. data/package/utils/__tests__/deep_assign.js +0 -32
  155. data/package/utils/__tests__/deep_merge.js +0 -10
  156. data/package/utils/__tests__/get_style_rule.js +0 -65
  157. data/package/utils/__tests__/objectify.js +0 -9
  158. data/package/utils/deep_assign.js +0 -22
  159. data/package/utils/deep_merge.js +0 -22
  160. data/package/utils/objectify.js +0 -3
@@ -1,53 +1,54 @@
1
+ const { merge } = require('webpack-merge')
1
2
  const webpack = require('webpack')
2
- const Base = require('./base')
3
+
4
+ const baseConfig = require('./base')
3
5
  const devServer = require('../dev_server')
6
+
4
7
  const { outputPath: contentBase, publicPath } = require('../config')
5
8
 
6
- module.exports = class extends Base {
7
- constructor() {
8
- super()
9
+ let devConfig = {
10
+ mode: 'development',
11
+ devtool: 'cheap-module-source-map'
12
+ }
9
13
 
10
- this.config.merge({
11
- mode: 'development',
12
- devtool: 'cheap-module-source-map'
14
+ if (
15
+ process.env.WEBPACK_DEV_SERVER &&
16
+ process.env.WEBPACK_DEV_SERVER !== 'undefined'
17
+ ) {
18
+ if (devServer.hmr) {
19
+ devConfig = merge(devConfig, {
20
+ output: { filename: '[name]-[hash].js' },
21
+ plugins: [new webpack.HotModuleReplacementPlugin()]
13
22
  })
23
+ }
14
24
 
15
- if (process.env.WEBPACK_DEV_SERVER
16
- && process.env.WEBPACK_DEV_SERVER !== 'undefined') {
17
- if (devServer.hmr) {
18
- this.plugins.append('HotModuleReplacement', new webpack.HotModuleReplacementPlugin())
19
- this.config.output.filename = '[name]-[hash].js'
20
- }
21
-
22
- this.config.merge({
23
- devServer: {
24
- clientLogLevel: 'none',
25
- compress: devServer.compress,
26
- quiet: devServer.quiet,
27
- disableHostCheck: devServer.disable_host_check,
28
- host: devServer.host,
29
- port: devServer.port,
30
- https: devServer.https,
31
- hot: devServer.hmr,
32
- contentBase,
33
- inline: devServer.inline,
34
- useLocalIp: devServer.use_local_ip,
35
- public: devServer.public,
36
- publicPath,
37
- historyApiFallback: {
38
- disableDotRule: true
39
- },
40
- headers: devServer.headers,
41
- overlay: devServer.overlay,
42
- stats: {
43
- entrypoints: false,
44
- errorDetails: true,
45
- modules: false,
46
- moduleTrace: false
47
- },
48
- watchOptions: devServer.watch_options
49
- }
50
- })
25
+ devConfig = merge(devConfig, {
26
+ devServer: {
27
+ clientLogLevel: 'none',
28
+ compress: devServer.compress,
29
+ quiet: devServer.quiet,
30
+ disableHostCheck: devServer.disable_host_check,
31
+ host: devServer.host,
32
+ port: devServer.port,
33
+ https: devServer.https,
34
+ hot: devServer.hmr,
35
+ contentBase,
36
+ inline: devServer.inline,
37
+ useLocalIp: devServer.use_local_ip,
38
+ public: devServer.public,
39
+ publicPath,
40
+ historyApiFallback: { disableDotRule: true },
41
+ headers: devServer.headers,
42
+ overlay: devServer.overlay,
43
+ stats: {
44
+ entrypoints: false,
45
+ errorDetails: true,
46
+ modules: false,
47
+ moduleTrace: false
48
+ },
49
+ watchOptions: devServer.watch_options
51
50
  }
52
- }
51
+ })
53
52
  }
53
+
54
+ module.exports = merge(baseConfig, devConfig)
@@ -1,77 +1,72 @@
1
- const TerserPlugin = require('terser-webpack-plugin')
1
+ /* eslint global-require: 0 */
2
+ /* eslint import/no-dynamic-require: 0 */
3
+
4
+ const { merge } = require('webpack-merge')
2
5
  const CompressionPlugin = require('compression-webpack-plugin')
3
- const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
4
- const safePostCssParser = require('postcss-safe-parser')
5
- const Base = require('./base')
6
+ const TerserPlugin = require('terser-webpack-plugin')
7
+ const baseConfig = require('./base')
8
+ const { moduleExists } = require('../utils/helpers')
6
9
 
7
- module.exports = class extends Base {
8
- constructor() {
9
- super()
10
+ const getPlugins = () => {
11
+ let compressionPlugin = new CompressionPlugin({
12
+ filename: '[path].gz[query]',
13
+ algorithm: 'gzip',
14
+ test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/
15
+ })
10
16
 
11
- this.plugins.append(
12
- 'Compression',
13
- new CompressionPlugin({
14
- filename: '[path].gz[query]',
15
- algorithm: 'gzip',
16
- test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/
17
- })
18
- )
17
+ if ('brotli' in process.versions) {
18
+ compressionPlugin = new CompressionPlugin({
19
+ filename: '[path].br[query]',
20
+ algorithm: 'brotliCompress',
21
+ test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/
22
+ })
23
+ }
19
24
 
20
- if ('brotli' in process.versions) {
21
- this.plugins.append(
22
- 'Compression Brotli',
23
- new CompressionPlugin({
24
- filename: '[path].br[query]',
25
- algorithm: 'brotliCompress',
26
- test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/
27
- })
28
- )
29
- }
25
+ return [compressionPlugin]
26
+ }
30
27
 
31
- this.plugins.append(
32
- 'OptimizeCSSAssets',
33
- new OptimizeCSSAssetsPlugin({
34
- parser: safePostCssParser,
35
- map: {
36
- inline: false,
37
- annotation: true
28
+ const productionConfig = {
29
+ devtool: 'source-map',
30
+ stats: 'normal',
31
+ bail: true,
32
+ plugins: getPlugins(),
33
+ optimization: {
34
+ minimizer: [
35
+ () => {
36
+ if (
37
+ moduleExists('css-loader') &&
38
+ moduleExists('css-minimizer-webpack-plugin')
39
+ ) {
40
+ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
41
+ return new CssMinimizerPlugin({ sourceMap: true })
38
42
  }
39
- })
40
- )
41
43
 
42
- this.config.merge({
43
- devtool: 'source-map',
44
- stats: 'normal',
45
- bail: true,
46
- optimization: {
47
- minimizer: [
48
- new TerserPlugin({
49
- parallel: Number.parseInt(process.env.WEBPACKER_PARALLEL, 10) || true,
50
- cache: true,
51
- sourceMap: true,
52
- terserOptions: {
53
- parse: {
54
- // Let terser parse ecma 8 code but always output
55
- // ES5 compliant code for older browsers
56
- ecma: 8
57
- },
58
- compress: {
59
- ecma: 5,
60
- warnings: false,
61
- comparisons: false
62
- },
63
- mangle: {
64
- safari10: true
65
- },
66
- output: {
67
- ecma: 5,
68
- comments: false,
69
- ascii_only: true
70
- }
71
- }
72
- })
73
- ]
74
- }
75
- })
44
+ return false
45
+ },
46
+
47
+ new TerserPlugin({
48
+ parallel: Number.parseInt(process.env.WEBPACKER_PARALLEL, 10) || true,
49
+ terserOptions: {
50
+ parse: {
51
+ // Let terser parse ecma 8 code but always output
52
+ // ES5 compliant code for older browsers
53
+ ecma: 8
54
+ },
55
+ compress: {
56
+ ecma: 5,
57
+ warnings: false,
58
+ comparisons: false
59
+ },
60
+ mangle: { safari10: true },
61
+ output: {
62
+ ecma: 5,
63
+ comments: false,
64
+ ascii_only: true
65
+ }
66
+ }
67
+ })
68
+ ].filter(Boolean)
76
69
  }
77
70
  }
71
+
72
+ module.exports = merge(baseConfig, productionConfig)
@@ -1,3 +1,3 @@
1
- const Base = require('./base')
1
+ const baseConfig = require('./base')
2
2
 
3
- module.exports = class extends Base {}
3
+ module.exports = baseConfig
@@ -1,24 +1,29 @@
1
1
  /* eslint global-require: 0 */
2
2
  /* eslint import/no-dynamic-require: 0 */
3
3
 
4
+ const { merge } = require('webpack-merge')
4
5
  const { resolve } = require('path')
5
6
  const { existsSync } = require('fs')
6
- const Environment = require('./environments/base')
7
- const loaders = require('./rules')
7
+ const baseConfig = require('./environments/base')
8
+ const rules = require('./rules')
8
9
  const config = require('./config')
9
10
  const devServer = require('./dev_server')
10
11
  const { nodeEnv } = require('./env')
12
+ const { moduleExists, canProcess } = require('./utils/helpers')
11
13
 
12
- const createEnvironment = () => {
14
+ const webpackConfig = () => {
13
15
  const path = resolve(__dirname, 'environments', `${nodeEnv}.js`)
14
- const constructor = existsSync(path) ? require(path) : Environment
15
- return new constructor()
16
+ const environmentConfig = existsSync(path) ? require(path) : baseConfig
17
+ return environmentConfig
16
18
  }
17
19
 
18
20
  module.exports = {
19
21
  config,
20
22
  devServer,
21
- environment: createEnvironment(),
22
- Environment,
23
- loaders
23
+ webpackConfig: webpackConfig(),
24
+ baseConfig,
25
+ rules,
26
+ merge,
27
+ moduleExists,
28
+ canProcess
24
29
  }
@@ -1,10 +1,12 @@
1
1
  const { resolve } = require('path')
2
2
  const { realpathSync } = require('fs')
3
- const { source_path: sourcePath, additional_paths: additionalPaths } = require('../config')
4
- const { nodeEnv } = require('../env')
5
3
 
6
- // Process application Javascript code with Babel.
7
- // Uses application .babelrc to apply any transformations
4
+ const {
5
+ source_path: sourcePath,
6
+ additional_paths: additionalPaths
7
+ } = require('../config')
8
+ const { isProduction } = require('../env')
9
+
8
10
  module.exports = {
9
11
  test: /\.(js|jsx|mjs|ts|tsx)?(\.erb)?$/,
10
12
  include: [sourcePath, ...additionalPaths].map((p) => {
@@ -17,11 +19,11 @@ module.exports = {
17
19
  exclude: /node_modules/,
18
20
  use: [
19
21
  {
20
- loader: 'babel-loader',
22
+ loader: require.resolve('babel-loader'),
21
23
  options: {
22
24
  cacheDirectory: true,
23
- cacheCompression: nodeEnv === 'production',
24
- compact: nodeEnv === 'production'
25
+ cacheCompression: isProduction,
26
+ compact: isProduction
25
27
  }
26
28
  }
27
29
  ]
@@ -0,0 +1,6 @@
1
+ const { canProcess } = require('../utils/helpers')
2
+
3
+ module.exports = canProcess('coffee-loader', (resolvedPath) => ({
4
+ test: /\.coffee(\.erb)?$/,
5
+ use: [{ loader: resolvedPath }]
6
+ }))
@@ -0,0 +1,15 @@
1
+ const { canProcess } = require('../utils/helpers')
2
+
3
+ const runner = /^win/.test(process.platform) ? 'ruby ' : ''
4
+
5
+ module.exports = canProcess('rails-erb-loader', (resolvedPath) => ({
6
+ test: /\.erb$/,
7
+ enforce: 'pre',
8
+ exclude: /node_modules/,
9
+ use: [
10
+ {
11
+ loader: resolvedPath,
12
+ options: { runner: `${runner}bin/rails runner` }
13
+ }
14
+ ]
15
+ }))
@@ -1,21 +1,21 @@
1
- const { join } = require('path')
2
- const { source_path: sourcePath, static_assets_extensions: fileExtensions } = require('../config')
3
-
4
1
  module.exports = {
5
- test: new RegExp(`(${fileExtensions.join('|')})$`, 'i'),
6
- use: [
7
- {
8
- loader: 'file-loader',
9
- options: {
10
- name(file) {
11
- if (file.includes(sourcePath)) {
12
- return 'media/[path][name]-[hash].[ext]'
13
- }
14
- return 'media/[folder]/[name]-[hash:8].[ext]'
15
- },
16
- esModule: false,
17
- context: join(sourcePath)
18
- }
19
- }
20
- ]
2
+ test: [
3
+ /\.bmp$/,
4
+ /\.gif$/,
5
+ /\.jpe?g$/,
6
+ /\.png$/,
7
+ /\.tiff$/,
8
+ /\.ico$/,
9
+ /\.avif$/,
10
+ /\.webp$/,
11
+ /\.eot$/,
12
+ /\.otf$/,
13
+ /\.ttf$/,
14
+ /\.woff$/,
15
+ /\.woff2$/,
16
+ /\.html$/,
17
+ /\.json$/
18
+ ],
19
+ exclude: [/\.(js|mjs|jsx|ts|tsx)$/],
20
+ type: 'asset/resource'
21
21
  }
@@ -1,20 +1,17 @@
1
- const babel = require('./babel')
2
- const file = require('./file')
3
- const css = require('./css')
4
- const sass = require('./sass')
5
- const moduleCss = require('./module.css')
6
- const moduleSass = require('./module.sass')
7
- const nodeModules = require('./node_modules')
1
+ /* eslint global-require: 0 */
2
+ /* eslint import/no-dynamic-require: 0 */
8
3
 
9
- // Webpack loaders are processed in reverse order
10
- // https://webpack.js.org/concepts/loaders/#loader-features
11
- // Lastly, process static files using file loader
12
- module.exports = {
13
- file,
14
- css,
15
- sass,
16
- moduleCss,
17
- moduleSass,
18
- nodeModules,
19
- babel
4
+ const rules = {
5
+ file: require('./file'),
6
+ svg: require('./svg'),
7
+ css: require('./css'),
8
+ sass: require('./sass'),
9
+ babel: require('./babel'),
10
+ erb: require('./erb'),
11
+ coffee: require('./coffee'),
12
+ less: require('./less')
20
13
  }
14
+
15
+ module.exports = Object.keys(rules)
16
+ .filter((key) => !!rules[key])
17
+ .map((key) => rules[key])
@@ -0,0 +1,22 @@
1
+ const path = require('path')
2
+ const { canProcess } = require('../utils/helpers')
3
+ const getStyleRule = require('../utils/get_style_rule')
4
+
5
+ const {
6
+ additional_paths: paths,
7
+ source_path: sourcePath
8
+ } = require('../config')
9
+
10
+ module.exports = canProcess('less-loader', (resolvedPath) =>
11
+ getStyleRule(/\.(less)(\.erb)?$/i, [
12
+ {
13
+ loader: resolvedPath,
14
+ options: {
15
+ lessOptions: {
16
+ paths: [path.resolve(__dirname, 'node_modules'), sourcePath, ...paths]
17
+ },
18
+ sourceMap: true
19
+ }
20
+ }
21
+ ])
22
+ )
@@ -1,14 +1,17 @@
1
+ /* eslint global-require: 0 */
2
+
1
3
  const getStyleRule = require('../utils/get_style_rule')
4
+ const { canProcess } = require('../utils/helpers')
2
5
  const { additional_paths: includePaths } = require('../config')
3
6
 
4
- module.exports = getStyleRule(/\.(scss|sass)(\.erb)?$/i, false, [
5
- {
6
- loader: 'sass-loader',
7
- options: {
8
- sourceMap: true,
9
- sassOptions: {
10
- includePaths
7
+ module.exports = canProcess('sass-loader', (resolvedPath) =>
8
+ getStyleRule(/\.(scss|sass)(\.erb)?$/i, [
9
+ {
10
+ loader: resolvedPath,
11
+ options: {
12
+ sassOptions: { includePaths },
13
+ implementation: require('sass')
11
14
  }
12
15
  }
13
- }
14
- ])
16
+ ])
17
+ )