forked from jhen0409/react-chrome-extension-boilerplate
-
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.
Use
css-modules-require-hook
instead of babel-plugin-webpack-loaders
due to postcss-loader breaks webpack-loaders plugin, the plugin not active maintenance, and we are ready to migrate to webpack 2.
- Loading branch information
Showing
4 changed files
with
1,416 additions
and
1,255 deletions.
There are no files selected for viewing
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,11 +1,4 @@ | ||
{ | ||
"presets": ["es2015", "stage-0", "react"], | ||
"plugins": ["add-module-exports", "transform-decorators-legacy", "transform-runtime"], | ||
"env": { | ||
"test": { | ||
"plugins": [ | ||
["webpack-loaders", { "config": "webpack/test.config.js", "verbose": false }] | ||
] | ||
} | ||
} | ||
"plugins": ["add-module-exports", "transform-decorators-legacy", "transform-runtime"] | ||
} |
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,12 @@ | ||
import { jsdom } from 'jsdom'; | ||
import hook from 'css-modules-require-hook'; | ||
import postCSSConfig from '../webpack/postcss.config'; | ||
|
||
global.document = jsdom('<!doctype html><html><body></body></html>'); | ||
global.window = document.defaultView; | ||
global.navigator = global.window.navigator; | ||
|
||
hook({ | ||
generateScopedName: '[name]__[local]___[hash:base64:5]', | ||
prepend: postCSSConfig.plugins, | ||
}); |
Oops, something went wrong.