Comments (4)
Seems like Wallaby is not loading the AureliaWebpackPlugin. I don't have a license for Wallaby, so hard for me to help with that particular problem, I believe it could be solved with the right configuration file for Wallaby.
from loader-webpack.
Thanks. I'll see what I do with the Wallaby config. In any case, it may be that this gets fixed when #19 gets resolved.
For info - this is my wallabyjs config file - works perfectly until I add :
import {bootstrap} from 'aurelia-bootstrapper-webpack';
to a test.
/// Loading existing webpack config
process.env.NODE_ENV = 'test';
var webpackConfig = require('./webpack.config');
// Cleaning it
delete webpackConfig.entry;
delete webpackConfig.devServer;
delete webpackConfig.resolve.root;
delete webpackConfig.module.postLoaders;
webpackConfig.module.loaders.shift();
webpackConfig.plugins = webpackConfig.plugins.filter(p => !p.getPath);
webpackConfig.entryPatterns = ['test/unit/setup.js', 'test/**/*.spec.js'];
var wallabyWebpack = require('wallaby-webpack');
var wallabyPostprocessor = wallabyWebpack(webpackConfig);
module.exports = function (wallaby) {
return {
files: [
{pattern: 'node_modules/jasmine-expect/dist/jasmine-matchers.js', load: true, instrument: false},
{pattern: 'node_modules/sinon/pkg/sinon.js', instrument: false},
{pattern: 'test/unit/setup.js', load: false},
{pattern: 'src/**/*.js', load: false}
],
tests: [
'!test/e2e/**',
{pattern: 'test/**/*.spec.js', load: false}
],
postprocessor: wallabyPostprocessor,
compilers: {
'**/*.js': wallaby.compilers.babel({
presets: ['es2015', 'stage-1'],
plugins: ['transform-decorators-legacy']
})
},
setup: function () {
window.__moduleBundler.loadTests();
},
debug: true
};
};
This is my webpack.conf.js file:
/**
* To learn more about how to use Easy Webpack
* Take a look at the README here: https://github.com/easy-webpack/core
**/
const webpack = require('webpack');
const easyWebpack = require('@easy-webpack/core');
const generateConfig = easyWebpack.default;
const path = require('path');
let ENV = process.env.NODE_ENV && process.env.NODE_ENV.toLowerCase() || 'development';
if (process.env.FAKE_DATA) {
ENV += '_fake_data';
}
const definePlugin = new webpack.DefinePlugin({
__ENV__: "'" + ENV + "'"
});
// basic configuration:
const title = 'my app';
const baseUrl = '/';
const rootDir = path.resolve();
const srcDir = path.resolve('src');
const outDir = path.resolve('dist');
const coreBundles = {
bootstrap: [
'aurelia-bootstrapper-webpack',
'aurelia-polyfills',
'aurelia-pal',
'aurelia-pal-browser',
'regenerator-runtime',
'bluebird'
],
// these will be included in the 'aurelia' bundle (except for the above bootstrap packages)
aurelia: [
'aurelia-bootstrapper-webpack',
'aurelia-binding',
'aurelia-configuration',
'aurelia-dependency-injection',
'aurelia-event-aggregator',
'aurelia-fetch-client',
'aurelia-framework',
'aurelia-history',
'aurelia-history-browser',
'aurelia-http-client',
'aurelia-loader',
'aurelia-loader-webpack',
'aurelia-logging',
'aurelia-logging-console',
'aurelia-metadata',
'aurelia-pal',
'aurelia-pal-browser',
'aurelia-path',
'aurelia-polyfills',
'aurelia-route-recognizer',
'aurelia-router',
'aurelia-task-queue',
'aurelia-templating',
'aurelia-templating-binding',
'aurelia-templating-router',
'aurelia-templating-resources',
'aurelia-validation'
],
vendor: [
'moment'
]
};
const baseConfig = {
entry: {
'app': ['./src/main'],
'aurelia-bootstrap': coreBundles.bootstrap,
'aurelia': coreBundles.aurelia.filter(pkg => coreBundles.bootstrap.indexOf(pkg) === -1),
'vendor': coreBundles.vendor
},
output: {
path: outDir
},
plugins: [definePlugin]
};
// advanced configuration:
switch (ENV) {
case 'production':
config = generateConfig(
baseConfig,
require('@easy-webpack/config-env-production')
({compress: true}),
require('@easy-webpack/config-aurelia')
({root: rootDir, src: srcDir, title: title, baseUrl: baseUrl}),
require('@easy-webpack/config-babel')(),
require('@easy-webpack/config-html')(),
require('@easy-webpack/config-json')(),
require('@easy-webpack/config-sass')
({filename: 'gds.css', allChunks: true, sourceMap: false}),
require('@easy-webpack/config-fonts-and-images')(),
require('@easy-webpack/config-global-bluebird')(),
require('@easy-webpack/config-global-regenerator')(),
require('@easy-webpack/config-generate-index-html')
({
minify: false, overrideOptions: {
'xhtml': true
}
}),
require('@easy-webpack/config-copy-files')
({
patterns: [
{from: 'favicon.ico', to: 'favicon.ico'},
{from: 'config/**/*', to: './'}
]
}),
require('@easy-webpack/config-common-chunks-simple')
({appChunkName: 'app', firstChunk: 'aurelia-bootstrap'}),
require('@easy-webpack/config-uglify')
({debug: false})
);
break;
case 'test':
config = generateConfig(
baseConfig,
require('@easy-webpack/config-env-development')
({devtool: 'inline-source-map'}),
require('@easy-webpack/config-aurelia')
({root: rootDir, src: srcDir, title: title, baseUrl: baseUrl}),
require('@easy-webpack/config-babel')(),
require('@easy-webpack/config-html')(),
require('@easy-webpack/config-json')(),
require('@easy-webpack/config-sass')
({filename: 'gds.css', allChunks: true, sourceMap: false}),
require('@easy-webpack/config-fonts-and-images')(),
require('@easy-webpack/config-global-bluebird')(),
require('@easy-webpack/config-global-regenerator')(),
require('@easy-webpack/config-generate-index-html')(),
require('@easy-webpack/config-test-coverage-istanbul')(),
{devtool: '#inline-source-map'}
);
break;
default:
case 'development':
process.env.NODE_ENV = 'development';
config = generateConfig(
baseConfig,
require('@easy-webpack/config-env-development')(),
require('@easy-webpack/config-aurelia')
({root: rootDir, src: srcDir, title: title, baseUrl: baseUrl}),
require('@easy-webpack/config-babel')(),
require('@easy-webpack/config-html')(),
require('@easy-webpack/config-json')(),
require('@easy-webpack/config-sass')
({filename: 'gds.css', allChunks: true, sourceMap: true}),
require('@easy-webpack/config-fonts-and-images')(),
require('@easy-webpack/config-global-bluebird')(),
require('@easy-webpack/config-global-regenerator')(),
require('@easy-webpack/config-generate-index-html')
({minify: false}),
require('@easy-webpack/config-copy-files')
({
patterns: [
{from: 'favicon.ico', to: 'favicon.ico'},
{from: 'config/**/*', to: './'}
]
}),
require('@easy-webpack/config-common-chunks-simple')
({appChunkName: 'app', firstChunk: 'aurelia-bootstrap'}),
{devtool: '#inline-source-map'}
);
break;
}
module.exports = config;
from loader-webpack.
Improvements coming in next releases.
from loader-webpack.
Fixed in aurelia/skeleton-navigation#714
from loader-webpack.
Related Issues (20)
- Make possible to use a different name for the app chunk HOT 7
- @noView not loading in Webpack HOT 1
- [Question] No view model found in module "app" HOT 3
- causes webpack to source every module in node_modules/package.json and my project whether it is used by my code (as in transitively included by an entrypoint) or not. HOT 12
- Module not found: Error: Can't resolve 'css' HOT 2
- Error: Unable to find module with ID: main with Latest TypeScript/Webpack HOT 3
- Building fails HOT 1
- Can't use es2015 or native-modules with webpack HOT 1
- Upgrading app from v1.0.3 to v2.0.0 breaks my app HOT 3
- pet HOT 1
- Missing Webpack declaration in /dist/**/*.d.ts HOT 3
- Webpack log size problem HOT 6
- Code split module doesn't get updated in HMR mode HOT 4
- View only routes importing incorrectly HOT 2
- Using aliases/paths not supported in require tag
- Aurelia Plugin doesn't use Webpack "entry" items as expected HOT 1
- Typings missing in release 2.2.3 HOT 1
- Injected style elements: Multiple /* sourceURL */ lines causes browser devtools issues HOT 3
- Error: Can't resolve 'aurelia-loader-context' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loader-webpack.