Created
January 11, 2019 10:09
-
-
Save meDavid/806835dc47f06797b711c1385c45126c to your computer and use it in GitHub Desktop.
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
// Copy of https://github.com/bahmutov/cypress-angular-unit-test/blob/master/cypress/plugins/cy-ts-preprocessor.js | |
const wp = require('@cypress/webpack-preprocessor') | |
const webpackOptions = { | |
resolve: { | |
extensions: ['.ts', '.js'] | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.ts$/, | |
loaders: ['ts-loader', 'angular2-template-loader'], | |
exclude: [/node_modules/], | |
}, | |
{ | |
test: /\.(html|css)$/, | |
loader: 'raw-loader', | |
exclude: /\.async\.(html|css)$/ | |
}, | |
{ | |
test: /\.async\.(html|css)$/, | |
loaders: ['file?name=[name].[hash].[ext]', 'extract'] | |
} | |
] | |
} | |
} | |
const options = { | |
webpackOptions | |
} | |
module.exports = wp(options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment