-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: for `webpack@4` use `@stackr23/webpack@2` * deps: upgrade webpack packages `webpack`, `webpack-cli`, `webpack-dev-server`, `webpack-merge` * deps: upgrade other webpack releated pckgs * webpack-helpers: `copy-webpack-plugin`, `html-webpack-plugin`, `mini-css-extract-plugin` * webpack-loaders: `loader-utils`, `css-loader`, `postcss-loader"`, `sass-loader`, `source-map-loader`, `style-loader` * deps: upgrade `karma-webpack` to v5 * deps: update post-css packages * refactor(webpack-merge): migrate to new version * refactor: migrate `post-css` options to v8 * refactor: migrate options to webpack v5 * `splitChunks.cacheGroups.vendors` → `splitChunks.cacheGroups.defaultVendors` * change `sass-loader`s 'query' key to 'options' * refactor: remove `addEnvVariables()` in merge fn TODO: refactor mode/env (#4) * config(npm): remove `-p` from webpack commands * config(test): use `NODE_ENV` in karma.webpack.mode * test(assets): remove __esModule' import test closes #10
- Loading branch information
Showing
10 changed files
with
2,408 additions
and
3,508 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
const merge = require('webpack-merge') | ||
const { merge } = require('webpack-merge') | ||
|
||
const utils = require('../../utils') | ||
const getDevelopConfig = require('./develop.config') | ||
const { setEnvVariable } = require('../../utils') | ||
|
||
exports.config = merge([ utils.setEnvVariable('process.env.NODE_ENV', 'mock') ]) | ||
setEnvVariable('process.env.NODE_ENV', 'mock') | ||
|
||
exports.config = merge(getDevelopConfig('development_mock')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
import * as assets from './index' | ||
|
||
console.log('ASSETS:\n') | ||
console.log(assets) | ||
|
||
const { chai: { expect }} = global | ||
|
||
describe('[Assets] - file-loader', function() { | ||
it('export-default-from as namespace', () => { | ||
// check export-default-from | ||
expect(assets.__esModule).to.be.equal(true) // eslint-disable-line import/namespace | ||
describe('[Assets] - file-loader combined with export-default-from', function() { | ||
it('imported namespace contains asset keys', () => { | ||
// check import - import-namespace combined with export-default-from | ||
expect(assets).to.contain.keys('stackr23_logo') | ||
}) | ||
|
||
it('output contains \'[path][name]\'', () => { | ||
// check path prefix | ||
it('asset key contains \'/[path]/[name].[ext]\'', () => { // check path prefix | ||
expect(assets.stackr23_logo).to.contain('/assets/stackr23_logo.jpg') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters