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
/** | |
* For windows compatibility, we need to use windows path separators for webpack | |
* "test" properties. | |
*/ | |
function toTestRegExp(file) { | |
return new RegExp( | |
file.split('/').join(path.sep).replace(/\\/g, '\\') | |
); | |
} | |
const base = { | |
/** | |
* https://webpack.js.org/configuration/entry-context/ | |
*/ | |
context: toAbsolute('.'), | |
/** | |
* https://webpack.js.org/configuration/module/ | |
*/ | |
module: { | |
rules: [ | |
{ | |
test: /\.(js|jsx)$/, | |
include: toAbsolute('./src'), | |
loader: 'babel-loader', | |
}, | |
{ | |
test: toTestRegExp('scripts/build/version.js'), | |
use: { | |
loader: 'val-loader', | |
}, | |
}, | |
], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment